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
NewbieJono
Post Patron
Post Patron

Ignore Top 10 on measure

could anyone help with this issue

 

Untitled.png

2 ACCEPTED SOLUTIONS

You are going to have to use a measure rather than the 'Display as %' option.   If there are 2 items that you need to not consider in the total it would be something like this.

Percentage =
DIVIDE (
    SUM ( YourTable[Expense] ),
    CALCULATE (
        SUM ( YourTable[Expense] ),
        ALL ( YourTable[Description] ),
        NOT ( YourTable[Description] IN { "Excluded Description 1", "Excluded Description 2" } )
    )
)

View solution in original post

thanks for your reply. the percentage displays correct when using this code, but then i apply top 10 filter to description it still has the same issue

 

Percentage1 = 
DIVIDE (
    SUM ( 'FACT - Error Data'[ALL]),
    CALCULATE (
        SUM ( 'FACT - Error Data'[ALL] ),
        ALL ( 'FACT - Error Data'[DESCRIPTION]),
        NOT ('FACT - Error Data'[FAILURE REASON] IN { 51, 52 } )
    )
)

 

View solution in original post

8 REPLIES 8
jdbuchanan71
Super User
Super User

Yep, you need both the exclusion in the measure to take care of the denominator and the filter on the visual to take care of the numerator.

NewbieJono
Post Patron
Post Patron

sorry i dont feel like i am explain myself very well. Here is a snapshot of my tables.  i have blanked out some sensitive info.

 

the issue is when i apply the top 10 inbuilt filter. The percentage is also not a mesure it is just selecting the display as a percentage option. The second image show how the Percentage changes to percentage of the top 10

 

To make things a but more complicated, in desctiption i do need to filter out two items, which i currently do on the filter pane.

 

Screenshot 2022-01-19 211337.png

 

 

jdbuchanan71
Super User
Super User

@NewbieJono 

Try writing your Percentage measure like this.

Percentage =
DIVIDE (
    SUM ( YourTable[Expense] ),
    CALCULATE ( SUM ( YourTable[Expense] ), ALL ( YourTable[Person] ) )
)

You are going to have to use a measure rather than the 'Display as %' option.   If there are 2 items that you need to not consider in the total it would be something like this.

Percentage =
DIVIDE (
    SUM ( YourTable[Expense] ),
    CALCULATE (
        SUM ( YourTable[Expense] ),
        ALL ( YourTable[Description] ),
        NOT ( YourTable[Description] IN { "Excluded Description 1", "Excluded Description 2" } )
    )
)

thanks for your reply. the percentage displays correct when using this code, but then i apply top 10 filter to description it still has the same issue

 

Percentage1 = 
DIVIDE (
    SUM ( 'FACT - Error Data'[ALL]),
    CALCULATE (
        SUM ( 'FACT - Error Data'[ALL] ),
        ALL ( 'FACT - Error Data'[DESCRIPTION]),
        NOT ('FACT - Error Data'[FAILURE REASON] IN { 51, 52 } )
    )
)

 

I Think i got this working with your code, but it the chart was still including codes 51, 52. but when i addded a filter to exclude these it seemed to work. is this correct method? thanks for your help

 

TOP10 PERCENTAGE = 
DIVIDE (
    SUM ( 'FACT - Error Data'[ALL]),
    CALCULATE (
        SUM ( 'FACT - Error Data'[ALL] ),
        ALL ( 'FACT - Error Data'[DESCRIPTION]),
        NOT ('FACT - Error Data'[FAILURE REASON] IN {51,52 } )
    )
)

 

2.jpg

how could i mofify this so i can not ignore one of my filter?

 

Percentage =
DIVIDE (
    SUM ( YourTable[Expense] ),
    CALCULATE ( SUM ( YourTable[Expense] ), ALL ( YourTable[Person] ) )
)

The issue i provided is not my example but similar. The above does not work for me, i 

 

i work out my percentage like this

 

Daily Percentage Failure Rate = [Total Failures] / [Total Transactions]
 
The Dax For Total Failures is:
 
Total Failures =

VAR
TOTALFAIL = CALCULATE (
SUM('FACT - Error Data'[ALL]),
FILTER('FACT - Error Data','FACT - Error Data'[FAILURE REASON]<> 51 && 'FACT - Error Data'[FAILURE REASON]<> 52)
)

RETURN

TOTALFAIL
 
The dax for total transactions is
 
Total Transactions =

VAR
totalIntefrity = CALCULATE (
SUM('FACT - Integrity Data'[VOLUME]),
filter('FACT - Integrity Data','FACT - Integrity Data'[CODE]="TTE.02")
)

VAR
totalError = CALCULATE (
SUM('FACT - Error Data'[ALL]),
FILTER('FACT - Error Data','FACT - Error Data'[FAILURE REASON]= 51 || 'FACT - Error Data'[FAILURE REASON]= 52)
)

RETURN

totalIntefrity - TotalError

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.

Top Solution Authors