Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Dear Experts
Is there any way to change colour of part of line chart that exceeds certain level/value.
I would colour red the part of temperature chart that exceeds 40C.
Thanks in advance!
Solved! Go to Solution.
OK, I created an Enter Data query like this:
DateTemp
Tuesday, August 22, 2017 | 30 |
Wednesday, August 23, 2017 | 35 |
Thursday, August 24, 2017 | 36 |
Friday, August 25, 2017 | 37 |
Saturday, August 26, 2017 | 38 |
Sunday, August 27, 2017 | 39 |
Monday, August 28, 2017 | 40 |
Tuesday, August 29, 2017 | 41 |
Wednesday, August 30, 2017 | 42 |
Thursday, August 31, 2017 | 40 |
I created two measures like this:
Temp1 = IF(SUM(Temperatures[Temp])>40,BLANK(),SUM(Temperatures[Temp])) Temp2 = IF(SUM(Temperatures[Temp])>40,SUM(Temperatures[Temp]),BLANK())
Put both of these as Values in a line graph with an axis of Date. Not the exact effect I was going for but did display both lines in different colors.
Not to my knowledge with the OOTB line chart. Might look into a custom visual or R visualization. Would be a really nifty feature, you should suggest it as an Idea if it is not already out there. I'd vote for that.
One thought, could you potentially break up your value that you are charting such that it is the same metric but filtered to either be below or above 40C? Then you could put both measures into the line chart and color them differently. Would need to see sample data though.
Hello
I tried to split... but it seems I do something wrong as result is 2 identical charts
Measure1 = if(MAX([Value])>40;BLANK();MAX([Value]))
Measure2 = if(MAX([Value])<40;MAX([Value]);BLANK())
OK, I created an Enter Data query like this:
DateTemp
Tuesday, August 22, 2017 | 30 |
Wednesday, August 23, 2017 | 35 |
Thursday, August 24, 2017 | 36 |
Friday, August 25, 2017 | 37 |
Saturday, August 26, 2017 | 38 |
Sunday, August 27, 2017 | 39 |
Monday, August 28, 2017 | 40 |
Tuesday, August 29, 2017 | 41 |
Wednesday, August 30, 2017 | 42 |
Thursday, August 31, 2017 | 40 |
I created two measures like this:
Temp1 = IF(SUM(Temperatures[Temp])>40,BLANK(),SUM(Temperatures[Temp])) Temp2 = IF(SUM(Temperatures[Temp])>40,SUM(Temperatures[Temp]),BLANK())
Put both of these as Values in a line graph with an axis of Date. Not the exact effect I was going for but did display both lines in different colors.
It works. Not very elegant solution with continous X axis, categorical for some reason cuts big part of data. Hopefully in next revisiont that will look better.
Thanks for support!
Hmm. Really tough to be specific here, I may have to invent some sample data to play with. Perhaps if you filtered your data on import to above and below 40 and put them in separate tables? I'm going to play with this one, should be easy enough to generate some sample data, I assume that your x-axis is date/time based?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |