Forum Discussion
Line Chart: how to warn when values differences between two lines when exceeding a threshold
Hi guys,
I've got a line chart which displays two lines representing two temporal series: I'd like to highlight somehow when the difference between the values of the two lines exceed a threshold, any clue - example about it?
Thanks in advance!
6 Replies
- gkhareFrequent Visitor
Hello Luca,
I' am also stuck with the same scenario where I need to ive a warning message/pop up if for eg sales target are not achieved etc..
If you found solution to the above then please guide me as well
Thanks in advance
Gaurav
- itayromResolver II
gkhare, regarding your case, what I would do is as follows:
1. Add a measure with a DAX formula with the following structure- TagetsNotAchieved = IF(calculation, warning_msg, else_msg), where:
- calculation is a calculation to check if the target was achieved(E.g. SUM([Sales]) >= target).
- warning_msg is a static textual to be shown when the target was not achieved(E.g. "Sales target is not achieved").
- else_msg is a static textual value to be shown when the target was achieved,or an empty string(I.e. "") if you don't want a message to be shown.
2. Add a card visual to your report, and set the TagetsNotAchieved measure as its field.
3. Change the Card's formatting to make it look more "warningy".
- gkhareFrequent Visitor
Hi,
Many Thanks for providing solution...
One more help required..kindly guide me on how to send alert in form of an email if the difference of value/target exceeds a threshold limit.
Regards
GK
- itayromResolver II
I don't think the line chart visual offers this kind of behavior. The closest thing it has is the reference line, but I guess it's not what you're looking for. The best option I can think of at the moment is to create two calculated columns for each column displayed on the line chart, defined as follows:
1. ColNameBelowThreshold = IF([ColName] <= threshold, [ColName], BLANK());
2. ColNameOverThreshold = IF([ColName] > threshold, [ColName], BLANK());
3. threshold can be a variable, a static value, or a calculation of some sort that represents the desired threshold.
4. You might need to tweak the above formulas a bit, depending on your data, so that one line would pick up where the other one ends.
You could then display them both on the line chart, and give ColNameOverThreshold a different color in the "Data Colors" menu in the formatting pane to make it apprear highlighted.