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.
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 } )
)
)
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.
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.
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 } )
)
)
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |