Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear All,
Based on the below data I need another column named Percentage that calculates percentage as (Sum of 4 & 5 / Total ) * 100.
The below table is a matrix table. Kindly help.
@v-jianboli-msft Please help me.
Solved! Go to Solution.
I found a resolution to this as below:
Measure =
VAR Count45_ = CALCULATE (
COUNT ( VW_DetailLookUp[Response] ),
FILTER (
ALLEXCEPT ( VW_DetailLookUp, VW_DetailLookUp[FileLocation], VW_DetailLookUp[Questions] ),
OR ( [Response]="4-Agree", [Response]="5-StronglyAgree" )
))
VAR CountAll_ = CALCULATE (
COUNT ( VW_DetailLookUp[Response] ),
ALLEXCEPT ( VW_DetailLookUp, VW_DetailLookUp[FileLocation], VW_DetailLookUp[Questions] ))
RETURN
IF (SELECTEDVALUE ( ResponseMaster[Response] ) = "Sum of 4 & 5",
Count45_,
IF (SELECTEDVALUE ( ResponseMaster[Response] ) = "Percent",
DIVIDE(
Count45_,
CountAll_, 0
) * 100,
COUNT ( VW_DetailLookUp[Response] )
))
I found a resolution to this as below:
Measure =
VAR Count45_ = CALCULATE (
COUNT ( VW_DetailLookUp[Response] ),
FILTER (
ALLEXCEPT ( VW_DetailLookUp, VW_DetailLookUp[FileLocation], VW_DetailLookUp[Questions] ),
OR ( [Response]="4-Agree", [Response]="5-StronglyAgree" )
))
VAR CountAll_ = CALCULATE (
COUNT ( VW_DetailLookUp[Response] ),
ALLEXCEPT ( VW_DetailLookUp, VW_DetailLookUp[FileLocation], VW_DetailLookUp[Questions] ))
RETURN
IF (SELECTEDVALUE ( ResponseMaster[Response] ) = "Sum of 4 & 5",
Count45_,
IF (SELECTEDVALUE ( ResponseMaster[Response] ) = "Percent",
DIVIDE(
Count45_,
CountAll_, 0
) * 100,
COUNT ( VW_DetailLookUp[Response] )
))
@Arul I did create another measure. But it does not work as expected.
As in the below figure, I need the percentage calculated based on [Sum of 4 or 5] / Total.
Also, the below figure gives an idea of the measure I already have.
Kindly help.
check this thread, this might help you.
Thanks,
Arul
try this,
Percentage =
VAR _allValues = CALCULATE(
SUM(Table[columnvalue]),ALL(table))
VAR _result = DIVIDE([Sum of 4 & 5],_allValues)*100
RETURN _result
Thanks,
Arul
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |