Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, i have the following graph
The x-axis is the month and year, the Y axis is the value which is stored as a Whole Number.
The graph when plotted looks like this.
I am using the Max of value to display on the graph as for some reason i am unable to display it any other way
I need to put some conditional formatting on this graph, e.g. if the Max of Value is above 50, then the that month should be Red, if under 30, then orange etc. I also need to put a threshold on there, which will be just a line showing the threshold of 20.
I cant see the option to have conditioanl formatting. Can somone please assist me?
Thanks
Solved! Go to Solution.
Hi @PPStar ,
I created a sample pbix file(see attachment) for you base on your provided info.
1. Create a measure [color].
Color =
var t1 =MAX('Table'[Value])
RETURN
SWITCH(
TRUE(),
t1 >=50, 1,
t1 <=30, 2, 3
)
2. Make conditional formatting on Columns field(not Lines field) .
3.Conditional formatting cannot filter rows based on thresholds, and we can create a measure that shows the "year & month" that reached the threshold.
Measure =
var _threshold=20
var _b=CALCULATE(MAX('Table'[Value]),FILTER('Table',MAX('Table'[Value])=_threshold))
return _b
You may find the solutions in similar posts below to find it helpful.
Solved: Increasing and Decreasing trend color in line char... - Microsoft Power BI Community
Solved: Customize Column Colors in Stacked Column based on... - Microsoft Power BI Community
Line stacked column chat not updating field format... - Microsoft Power BI Community
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PPStar ,
I created a sample pbix file(see attachment) for you base on your provided info.
1. Create a measure [color].
Color =
var t1 =MAX('Table'[Value])
RETURN
SWITCH(
TRUE(),
t1 >=50, 1,
t1 <=30, 2, 3
)
2. Make conditional formatting on Columns field(not Lines field) .
3.Conditional formatting cannot filter rows based on thresholds, and we can create a measure that shows the "year & month" that reached the threshold.
Measure =
var _threshold=20
var _b=CALCULATE(MAX('Table'[Value]),FILTER('Table',MAX('Table'[Value])=_threshold))
return _b
You may find the solutions in similar posts below to find it helpful.
Solved: Increasing and Decreasing trend color in line char... - Microsoft Power BI Community
Solved: Customize Column Colors in Stacked Column based on... - Microsoft Power BI Community
Line stacked column chat not updating field format... - Microsoft Power BI Community
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
70 | |
38 | |
28 | |
26 |
User | Count |
---|---|
98 | |
96 | |
59 | |
44 | |
40 |