Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am hoping you may be able to assist in working out this conditional formatting.
The picture you see is the data taken from AAS (Azure Analytics Services). All the measure are created using DAX and this the final output in a matrix visual.
I wanted to use a conditional formatting where it takes the latest two dates of customer and compare the latest % space. If the % is lesser than the previous date then it should be highlighted in RED (as you see in the Picture - for customer B). The latest date for Customer B is 03-02-2022 (50) it is compared with 01-02-2022 (80) so the date 03-02 space has gone less. Same for Customer C.
I tried with some DAX calculation but it was not working.
@Crobby , Try a measure like this and use that in conditional formatting using field value option
measure =
var _max2 = maxx(filter(allselected(Table), Table[Customer] = max(Table[Customer]) && Table[Date] < Max([Date])), Table[Date])
var _slast = calculate([%space],filter( allselected(Table), Table[Date] = _max2))
return
if([%space] <_slast, "red", "white")
or
measure =
var _max = maxx(filter(allselected(Table), Table[Customer] = max(Table[Customer])), Table[Date])
var _max2 = maxx(filter(allselected(Table), Table[Customer] = max(Table[Customer]) && Table[Date] < Max([Date])), Table[Date])
var _slast = calculate([%space],filter( allselected(Table), Table[Date] = _max2))
return
if([%space] <_slast, "red", "white")
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
Hi @amitchandak Can you explain this line and why it is used
@Crobby , is this a measure Shelf_Analytics[Shelfspace] ?
if not use some aggregation
var _slast = calculate(sum(Shelf_Analytics[Shelfspace]),filter( allselected(Shelf_Analytics), Shelf_Analytics[SMFeedback_Date] = _max2))
in case you are looking for column replace max with earlier and you can remove allselected from tbale
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |