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.
i have calculated my percentage by using this calculation
Hi @benqpbi
The measures below change the filter context in your denominator
=
//shows the value each for 4 or 5 or 6
CALCULATE (
SUM ( 'Table Name'[comp_record] ),
FILTER ( 'Table Name', 'Table Name'[Level] IN { 4, 5, 6 } )
)
=
//shows the total value 4, 5 and 6 regardless of filter applied to table 'Table Name'[Level]
CALCULATE (
SUM ( 'Table Name'[comp_record] ),
FILTER ( ALL ( 'Table Name'[Level] ), 'Table Name'[Level] IN { 4, 5, 6 } )
)
=
//shows the total value 4, 5 and 6 regardless of filter applied to table 'Table Name'
CALCULATE (
SUM ( 'Table Name'[comp_record] ),
FILTER ( ALL ( 'Table Name' ), 'Table Name'[Level] IN { 4, 5, 6 } )
)
Proud to be a Super User!
hello, thank you
i have a doubt how it would calculate the percentage because i need to first calculate the percentage by using this
Hello, my suggestions were only for the denominator which is the second argument in your divide formula. Alternatively, you can modify your formula to show the value only if it meets a certain condition
=
IF (
SELECTEDVALUE ( 'Table Name'[Level] ) IN { 4, 5, 6 },
DIVIDE (
SUM ( 'Table Name'[comp_record] ),
CALCULATE ( SUM ( 'Table Name'[comp_record] ), ALL ( 'Table Name' ) )
)
)
Answers provided are based on the information provided. You can provide more details - sample data and expected result https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/3175712#M1071...
Proud to be a Super User!
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 |
---|---|
96 | |
95 | |
82 | |
71 | |
64 |
User | Count |
---|---|
115 | |
105 | |
95 | |
79 | |
72 |