Forum Discussion
shere100
7 years agoHelper II
Simple Calculation required
Hi, I need to do some simple percentage calaculation on two columns. Not Started 56 Pass 20 Fail 2 Total Work Items 78 I need to display the percentage of success rate. I....
- 7 years ago
Hi shere100
You may create a measure with COUNTX Function.For example:
Measure 2 = COUNTX ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Test Result] = "Pass" ), 'Table'[Test Result] ) / COUNTX ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Test Result] = "Not Started" ), 'Table'[Test Result] )Regards,
shere100
7 years agoHelper II
Apologies,
Currently the measure is 'Pass' / 'Not Started'.
How would I amend so that it is a'Pass' / 'Not Started + 'Pass' and incorporate in to the measure?
Measure =
SUMX (
FILTER ( ALLSELECTED ( Table2 ), Table2[Status] = "Pass" ),
Table2[Value]
)
/ SUMX (
FILTER ( ALLSELECTED ( Table2 ), Table2[Status] = "Not Started" ),
Table2[Value]
)
shere100
7 years agoHelper II
Hi, can you please advise?
- v-cherch-msft7 years agoMicrosoft Employee
Hi shere100
You could use || .For example:
Table2[Status] = "Not Started"||Table2[Status] = "Pass"
Regards,
- shere1007 years agoHelper II
Many thanks , the calculation is now showing correctly.