Hi I want to color the line chart: above avg (reference line) as yellow, below avg as green. How can I do it? I tried color by measure with palette but was stuck with limited choices, I tried color by expression but get the whole line as green. Thanks in advance.
Just do something like this for the expression in the Color by expression:
For some sample data i've put together, it gets me
In Appearance property, you will find Color and legend section. In that select custom color and choose 'By expression' option from the dropdown list.
Then write below expression in expression space.
=if(Avg([Field Name)>133,Yellow(),Green()) .
Maybe this will solve your issue.
Hi Anil I see the feature in available in Nov 2017. But this color setting is for reference line, I am looking for a way to color the measure. Thanks.
I added "all" in the dynamic reference line calculation and it worked. The reference line expression was to sum up the measure across the months and divide by month count. The reference line took the calculation without "all" because it was not impacted by dimension. Coloring condition was impacted by dimension though. So adding "all" would remove dimension impact. Thank you all for the input!