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.
Hello,
i need to apply conditional formatting in matrix visual in powerBI (top 3 value in each rows).
I Tried top n in dax but it did not worked for me .
ex- below snapshot for refrence
Thanks in advance.
Dhruti
Solved! Go to Solution.
Here's a measure expression that shows one way to do it. Just use this measure as the Field for conditional formatting for the measure in the matrix visual. Note that if you have a sort-by column on your month, you'll need to include that in the measure too.
Top3MonthColor =
VAR thismonth =
MIN ( 'Date'[Month] )
VAR top3Mos =
TOPN ( 3, ALLSELECTED ( 'Date'[Month] ), [Total Qty], DESC )
RETURN
IF ( thismonth IN top3Mos, "Light Green" )
Pat
Here's a measure expression that shows one way to do it. Just use this measure as the Field for conditional formatting for the measure in the matrix visual. Note that if you have a sort-by column on your month, you'll need to include that in the measure too.
Top3MonthColor =
VAR thismonth =
MIN ( 'Date'[Month] )
VAR top3Mos =
TOPN ( 3, ALLSELECTED ( 'Date'[Month] ), [Total Qty], DESC )
RETURN
IF ( thismonth IN top3Mos, "Light Green" )
Pat
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 |
---|---|
108 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |