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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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