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,
v-cherch-msft
7 years agoMicrosoft Employee
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
Thats absolutely brilliant, that works perfectly.
Final question, if I have a visual from one query can I use that query to add an another visual i.e for the measure I have created? or do I need to create a seperate query and then insert the measure?