Forum Discussion
Anonymous
4 years agoNot applicable
Dax color code for line graph
i have two lin values in Clustered column chart . i have attached two measure blow
Glidepath OB21 = CALCULATE(SUM('Master Data Base'[Value Month]),'Master Data Base'[Reduction buckets]=" Glidepath RF09")
Glidepath Dec =
CALCULATE(SUM('Master Data Base'[Value Month]),'Master Data Base'[Reduction buckets]=" Glidepath RF09"
&&
'Master Data Base'[Month]="Dec"
)
column value :
Now i am writing color code measure for line and column value
Actuals = CALCULATE(SUM('Master Data Base'[Value AC]),'Master Data Base'[Reduction buckets]=" Glidepath RF09")
Now i am writing color code measure for line and column value
color code :
Bar Color =
IF ( [Actuals] > [Glidepath OB21], "#800000", "Green")
Now i am trying to add both line graph in single measure like below
Bar Color =
IF(IF ( [Actuals] > [Glidepath OB21], "#800000", "Green"),
IF([Actuals] > [Glidepath Dec], "#800000", "Green") )
IF(IF ( [Actuals] > [Glidepath OB21], "#800000", "Green"),
IF([Actuals] > [Glidepath Dec], "#800000", "Green") )
But i am getting error in visuals not in measure . how i will write for two conditions for two line graph for color code .
Thanks in advance
Hi,
What kind of error are you getting? Anyway here is one way to do this:Color = SWITCH(TRUE(),[Base measure]>[Measure 2],"800000",[Base measure]>[Measure 1],"800000","Green")
End result:I hope this helps to solve your issue and if it does consider accepting this as a solution!
1 Reply
- ValtteriN
Community Champion
Hi,
What kind of error are you getting? Anyway here is one way to do this:Color = SWITCH(TRUE(),[Base measure]>[Measure 2],"800000",[Base measure]>[Measure 1],"800000","Green")
End result:I hope this helps to solve your issue and if it does consider accepting this as a solution!