Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi PBI Experts,
I am a new learner of Power Bi, but have a query with which I need Help.
I am trying to achieve conditional formatting on data with heirarchy, but not able to get desired solutions.
just briefing you about the hierarchy of data : Lets say, I have a column called Product which has all the products listed. So my hierarchy goes like
Product --> SubCategory_1 --> SubCategory_2 --> Subcategory3.
Now in my report, I need Product as column header and SubCategory_1 as its value (I have used matrix to achieve this).
I need to apply conditionally formatting on Subcategory_1 values based on statues of SubCategory_1 and SubCategory_3.
I have created a new column where i am calculating the logic using IF-THEN_ELSE statment.
the issue is that if-else statment is giving me 2 different output due to hierarchical data.
Can someone please help me with this issue. Any immediate help is appreciable. Matrix. Conditional format.
Thank you in advance.
Solved! Go to Solution.
Hi All,
I have now changed the logic into 2 different measures and with the help of Button and Bookmark i was able to meet my requirment.
so closing this thread and Thank you all for your help.
Regards,
Ravisha
Hi All,
I have now changed the logic into 2 different measures and with the help of Button and Bookmark i was able to meet my requirment.
so closing this thread and Thank you all for your help.
Regards,
Ravisha
Hi @Anonymous ,
Could you tell me if @sm_talha 's post helps you a little? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.Hope to hear from you
Best Regards,
Eyelyn Qin
Hi @Anonymous ,
You may try ISINSCOPE() to change the first hierarchy:
Measure = IF(ISINSCOPE('Table'[Sub2]),BLANK(),0)
Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ,
Thanks for responding.
I tried using Switch statment too but It is giving me 2 different output.
Let me show you my IF-else logic -
I tried the same with SWITCH statment, but that gave me same outcome.
Please suggest. Matrix. Conditional format.
https://radacad.com/write-conditional-statement-using-switch-in-dax-and-power-bi
follow the link and make measure like in url then apply to the desired coulumn in conditional formatting using field value
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 161 | |
| 132 | |
| 117 | |
| 79 | |
| 53 |