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.
Hi, MPetramalo214
The reason for the segmentation is that your running total measure([Sales Actual running total in Date]) has blank values.
Drag and drop the running total measure onto the line chart to see if the line is segmented.
Modify the measure of your running total like below:
Cumulative Total =
CALCULATE(
SUM( 'Table'[Sales] ),
FILTER( ALL( 'Table'[Date] ), 'Table'[Date] <= MAX( 'Table'[Date] ) )
)
You will then get a continuous running total on the line chart.
Like:
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.
Does that method allow you to dynamically change the line chart data colors based on a value? I've tried two different methods, one someone recommended below, and the one I referenced in the post. Its segmented because I'm using two measures to draw the lines; but I was hoping to acheive the measures checking if on the latest date of the current data set, we're either above or below goal; and the correct measure will draw the full line; while the other line fills blank.
Its currently separating them like: