Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Conditional formatting of a subtotal that has the same value as total

Hello Power BI Community

 

I need you're help to format my matrix, so I have the value of total(B) that have the same value of the subtotal(B) and I need to format one of them to white so it'll not show me the same value twice.

 

I tried to create a measure to change the color based on a condition but It changes the colors of the two values total and subtotal (the two B)

MatriceCondictionalFormating.png

 

Any one can give me an idea to work on this issue 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could create a column as new subcate.

Column = IF([Cate]=[Subcate],BLANK(),[Subcate])

Then create a measure.

Measure = 
IF(ISINSCOPE('Table'[Ssub]),SUM('Table'[value]),
IF(ISINSCOPE('Table'[Column])&&MAX('Table'[Column])=BLANK(),BLANK(),SUM('Table'[value])))

The final show:

vyalanwumsft_0-1668582601764.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could create a column as new subcate.

Column = IF([Cate]=[Subcate],BLANK(),[Subcate])

Then create a measure.

Measure = 
IF(ISINSCOPE('Table'[Ssub]),SUM('Table'[value]),
IF(ISINSCOPE('Table'[Column])&&MAX('Table'[Column])=BLANK(),BLANK(),SUM('Table'[value])))

The final show:

vyalanwumsft_0-1668582601764.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , You can use isinscope or if needed the value and create a color measure and use that in conditional formatting using field value option

 

if(isinscope(Table[B]) , "Yellow", "White")

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pane-66e0afcb15f3

 

Anonymous
Not applicable

I tried it and it changes the color of the level 1 and 2 they consider it as a total

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.