Forum Discussion
How to Add an Icon for Row-Wise Maximum Across Columns
I have a matrix visual with row heading Status, and column heading Month_Type and value Pct, please see below sample. I want to add a flag icon that will look across the columns and mark the highest value. Eg, in below screenshot, for Row D1, I want the value in column TM, 37.7% to be marked with a green flag. And for row D2, value in column LM, 35.5%. How do I go about identifying the maximum? I have tried the below code and it marks all the columns as maximum
Max_Across_Periods =
MAXX(
ALL('3. Appended_Status'[Month_Type]),
CALCULATE([Pct])
)
I have resolved the issue
10 Replies
- grazitti_sapna
Super User
Hi Sno_93 ,
You can achieve the same by Flag measure which should highlight the maximum value in the row and then use this measure in Back ground conditional formatting.
I've created a sample .pbix file, kindly refer attached file and let me know if that's your requirement.
๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!- Sno_93Frequent Visitor
Thank you, grazitti_sapna .However it isn't working the way that I want it to. I wonder if it is because Pct values themselves are measures.
- grazitti_sapna
Super User
Hi Sno_93,
I don't think that is the issue, you can try creating a measure on top ot PCT values and implement the same as i did in the sample .pbix file. what is the issue you are facing? any errors?
- anilelmastasi
Super User
Hello Sno_93 ,
To achieve this you should behave the column values like a table.
Max Value =
MAXX(
{[TM],
[LM],
[LY]},
[Value]
)this code will work for you. If you are interested you can read my old blog with translating:
https://medium.com/@anilelmastasi/power-bi-i%CC%87kiden-fazla-s%C3%BCtun-aras%C4%B1nda-maksimum-de%C4%9Feri-olan-sat%C4%B1r%C4%B1-bulmak-04cb436d0c19If this solved your issue, please mark it as the accepted solution. โ
- v-echaithra
Community Support
Hi Sno_93 ,
If you get a chance, please review the response shared abiiove and let us know if it aligns with your expectations. Should you need any additional details or clarification, feel free to let us know.
Regards,
Chaithra E. - v-echaithra
Community Support
Hi Sno_93 ,
May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.
Thank you.
- Sno_93Frequent Visitor
I have resolved the issue
- Ashish_Mathur
Super User
Hi,
Please share the download link of the PBI file.