March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am new to Power BI and now stuck in writing a measure to do conditional formatting.
I want to show if the number of complaints in different business units increase from last month to current month.
As it's still October now, conditional formatting should show the difference between August and September. Red refers to number increase, Green decrease, and yello when number is unchanged. This is how it should look like (I did it in Excel):
I tried to write a measure as below but it ends up applying to the entire visual and those that are empty are not calculated.
I have two questions here:
1. Can I only apply conditional formatting (background color) to October?
2. For those that are blank, how can I make it become 0 so that the measure can work for the conditional formatting?
Thanks for helping!
@Anonymous , Add +0 to the measure so that will show 0 in place of blank
+0 can force left join, so I usuallt prefer.
0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))
If you need color on for oct.
the return blank() or white color in else
example
Colour =
SWITCH(TRUE(),
max('Table'[Month]) = "OCT", "red", //loop if or switch if needed
"White")
Hi,
+0 works for me now, Thank you!
However, I sitll can't put color only on September (sorry not October), because when I applied the color measure to conditioning formatting, it applies to the entire matrix.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |