BookmarkSubscribeRSS Feed
SvenVM
Calcite | Level 5

Hello,

I have a question about the display rules in sas va7.1.

I've created a graph with 1 bar and 2 lines. The bar has a measure 'Delta_MWh', the 2 lines have measures Y and Z.

These measures are in the graph shown per team.

I want to turn the color of the bar into red when the value of 'Delta_MWh' is negative (<0) and in green when positive (>0).

So I made a display rule saying: 'Delta_MWh'<0, color red and 'Delta_MWh'>0, color green.

display rule.png

The result is that when 'Delta_MWh' is negative the whole team colors in red. So also the 2 lines (only the points are shown) are colored red while I only want to show the bar ('Delta_MWh') in red. Because the points have a fixed color. Is there a solution for this?

Graph without display rule:

zdr.png

Graph with display rule:

wdr.png

6 REPLIES 6
TejaSurapaneni
Lapis Lazuli | Level 10

Hi,

You went something thing wrong while building custom graph!!, first tella me how many measures you have, in the above example you are showing only one measure?

Select Line chart1 & Line Chart2 Axis to Right Axis in custom graph builder (by default it will shows Left Axis).

Here is the screen shot:

Line Chart 1.pngLine Chart 2.png

Hope that this will help you...

Thanks & Regards,

Teja Surapaneni

SvenVM
Calcite | Level 5

Hi,

Thanks for your answer.

Just tried this but I still have the same problem.

Both line markers colors into the same as the bar.

Best Regards,

Sven

TejaSurapaneni
Lapis Lazuli | Level 10

Hi Sven,

Can you share your custom graph steps & What what are the measures you have taken.

Thanks & Regards

Teja Surapaneni

SvenVM
Calcite | Level 5

Hi Teja,

I made a custom graph with one bar and 2 line charts.

After this, I kept the Y axis for the bar chart as a 'Left Y axis' and for the 2 line charts I changed the Y axis into a 'Right Y axis'. For the 2 lines I unchecked 'show line' and checked 'show markers'. For the rest nothing special for the Custom graph.

I use 3 different measures. (Measure X, Y and Z)

I created a display rule on measure X. (Where X is negative: color red, when X is positive: color green).

I didn't create a display rule for measures Y and Z. The measures Y and Z will always be positive and should keep always the color of the legend (orange and blue).

Hope this are enough details. (I can't give much more detail)

Regards,

Sven

TejaSurapaneni
Lapis Lazuli | Level 10

Hi,


You are selecting only 'show Markers'.

Select  'Show line' also.


Thanks & Regards,

Teja Surapaneni.

SvenVM
Calcite | Level 5

Hi Teja,

The lines aren't colored by the displaty rule, but the markers still have the same problem.

If I only select 'show line' the display rule works.

Is this a bug in SAS VA7.1?

I think normally the display rule should work correctly when you only select 'show markers'.

Regards,

Sven

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1661 views
  • 0 likes
  • 2 in conversation