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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.