Forum Discussion
Matrix total - turn into %
- 7 years ago
hi, Anonymous
Based on my research, You could try this way as below:
Step1:
Create a dim Score table like this:
Add an additional value "A" in it.
Step2:
Create the relationship between them as below:
Step3:
Create a measure like this
Measure 2 = IF ( CALCULATE ( MIN ( 'Dim'[Score] ) ) = "A", FORMAT ( DIVIDE ( CALCULATE ( COUNTA ( 'Table'[Score] ), 'Table'[Score] = "Met" ), CALCULATE ( COUNTA ( 'Table'[Score] ) ) ), "Percent" ), CALCULATE ( COUNTA ( 'Table'[Score] ) ) )Step4:
Drag Score from dim table and measure into matrix visual
Result:
and here is pbix file, please try it.
Best Regards,
Lin
hi, Anonymous
Based on my research, You could try this way as below:
Step1:
Create a dim Score table like this:
Add an additional value "A" in it.
Step2:
Create the relationship between them as below:
Step3:
Create a measure like this
Measure 2 =
IF (
CALCULATE ( MIN ( 'Dim'[Score] ) ) = "A",
FORMAT (
DIVIDE (
CALCULATE ( COUNTA ( 'Table'[Score] ), 'Table'[Score] = "Met" ),
CALCULATE ( COUNTA ( 'Table'[Score] ) )
),
"Percent"
),
CALCULATE ( COUNTA ( 'Table'[Score] ) )
)
Step4:
Drag Score from dim table and measure into matrix visual
Result:
and here is pbix file, please try it.
Best Regards,
Lin
v-lili6-msft This works but I can't believe there is not a simpler way. Also, this shows every row item including those that don't have data, I'm using a date slicer and items that don't occur in the filtered view are still showing but with no values. When I change the relationship to Both for Cross Filter, it removes the items that are empty but the % goes away