Forum Discussion
Percentage Help
Hi all
Im trying to display the value highlighted below as a percentage, however when i attempt to convert it, it shows 100%.
I'm looking to display the percentage for SLA Achieved across the dataset.
thankyou, Rob
You are missing a part of the CALCULATE,
Use the formula provided by rajendraongole1
If this helped you, please feel free to send a thumb up
SLA Achieved Percentage =
VAR TotalCount = COUNT('Table'[SLA Status]) -- Count of all SLA statuses
VAR AchievedCount = CALCULATE(COUNT('Table'[SLA Status]), 'Table'[SLA Status] = "SLA Achieved") -- Count of only "SLA Achieved"
RETURN
DIVIDE(AchievedCount, TotalCount, 0)
8 Replies
- rajendraongole1Super User
Hi rpjheeney - It looks like your measure for "SLA Achieved" is currently displaying as a count. When you try to convert it to a percentage, it likely calculates the percentage as 1.00 (or 100%) because it's not being divided by the total count of all SLA statuses.
SLA Achieved Percentage =
VAR TotalCount = COUNT('Table'[SLA Status]) -- Count of all SLA statuses
VAR AchievedCount = CALCULATE(COUNT('Table'[SLA Status]), 'Table'[SLA Status] = "SLA Achieved") -- Count of only "SLA Achieved"
RETURN
DIVIDE(AchievedCount, TotalCount, 0)- rpjheeneyFrequent Visitor
Thankyou for this, i've attempted to run this and it hasnt worked.
Please can you advise? Thanks, Rob
- MattiaFratelloSuper User
You are missing a part of the CALCULATE,
Use the formula provided by rajendraongole1
If this helped you, please feel free to send a thumb up
SLA Achieved Percentage =
VAR TotalCount = COUNT('Table'[SLA Status]) -- Count of all SLA statuses
VAR AchievedCount = CALCULATE(COUNT('Table'[SLA Status]), 'Table'[SLA Status] = "SLA Achieved") -- Count of only "SLA Achieved"
RETURN
DIVIDE(AchievedCount, TotalCount, 0)
- MattiaFratelloSuper User
Hi rpjheeney ,
First create a DAX Measure that calculates the count of SLA Achieved
COUNT OF SLA = CALCULATE(COUNT(SLA_ACHIVED), SLA_ACHIEVED = SLA_ACHIEVED)then create another DAX Measure as follow:
DIVIDE(COUNT OF SLA, COUNT(SLA_ACHIEVED))
Format this one as %
- Bibiano_GeraldoSuper User
Hi rpjheeney ,
Across dataset is what measure to compare? plase can you share the DAX used?
- rpjheeneyFrequent Visitor
Hi, thankyou for the response.
I'm looking to capture the percentage total where the value "SLA Achieved" appears across the table.
- AnonymousNot applicable
Hi, rpjheeney
Glad to hear you solved the problem!
If you can, please mark the correct answer as a standard answer, which will be beneficial for future users to read this post.Best Regards
Yongkang Hua