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
guanel1
Helper I
Helper I

show percentage of total on matrix

I am showing milestone status by percentages.

I want to only highlight the "ON TIME" row when it is less than 80%. My values are calcuating the Count of Milestone Status by percent of column total. 

 

Here is the rule i added: 

guanel1_1-1604358204991.png

 

But I get this result: 

guanel1_2-1604358322722.png

Issues: 

1. Why are the 100% and the 83.33% highlighted? 

2. How do I get only the "ON TIME" row to be conditionally formatted? When I filter out the LATE Column, then all the percentages become 100% (because it is based off column total)

 

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

Hi, @guanel1 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a1.png

 

You may create a measure as below.

Result = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALLEXCEPT('Table','Table'[Year])
    )
)

 

Then you may conditional formatting 'Result' as below.

a2.png

 

Result:

a3.png

 

Best Regards

Allan

 

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-alq-msft
Community Support
Community Support

Hi, @guanel1 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a1.png

 

You may create a measure as below.

Result = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALLEXCEPT('Table','Table'[Year])
    )
)

 

Then you may conditional formatting 'Result' as below.

a2.png

 

Result:

a3.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thankyou for your help! this worked.

AllisonKennedy
Super User
Super User

You may want to try creating explicit measures for this. If you only want the On Time percentage highlighted, create a measure for 

On Time Percentage =  

VAR _onTime = CALCULATE(COUNT(table[milestone status]), table[milestone status] = "On Time")

VAR _GT = CALCULATE(COUNT(table[milestone status]), ALL(table[milestone status]))

RETURN DIVIDE(_onTime, _GT)

 

then apply the conditional formatting to the NUMBER of the On Time Percentage measure.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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.