Forum Discussion
undefined
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.
- Anonymous4 years ago
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
5 Replies
- mh2587Super User
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
- AnonymousNot applicable
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. - AnonymousNot applicable
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. - AnonymousNot applicable
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 - AnonymousNot applicable
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