Forum Discussion
Line Chart w/ Conditional Formatting
- 4 years ago
Hi, MPetramalo214
Since in a line chart, a value field is plotted continuously, there is no segmentation for the same field.
And when the value of one field is used to draw a line chart with two fields, it will not be able to draw continuously.Then for the above case, only the above goal measure is needed, and what is not a above goal would be the below goal.
So what we need is the [Sales Actual running total] and the above goal measure, the below goal measure will no longer be needed and the line will be continuous at this point.
Note that the above goal measure is below the running total.
In other words, running sales totals are "below goal" and are shown in red, and above goal measure are still shown in green.
Please refer to the attachment below for details. (Edit: Please download the new attachment)
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is going to be tricky because data colors does not have a dynamic option. What you could do is have two measures. One measure creates the entire line when Today()'s total is > projected. Have that line be conditional so if Total today > projected then total else blank(). Then have another measure that calculates the line for when the line is below projected or just the opposite of the other measure. Put both of those measures as your values for the line chart and then you can set the color for one line to green and the other line to red. The red line will only show if you are above projectedon today vs green when below projected.
Okay, so I made the measures to check if sales > projected, but the line graph is still showing it segmented. How can I get the measure to check for the entire timeframe that we're looking at?
Measures:
Above Goal =
IF([Sales Actual running total in Date] >= [Sales Goal running total in Date],
Sheet1[Sales Actual running total in Date], BLANK())
Below Goal =
IF([Sales Actual running total in Date] < [Sales Goal running total in Date],
Sheet1[Sales Actual running total in Date], BLANK())