Forum Discussion
ALL vs ALLSELECTED vs ????
I have a measure used to calculate a percentage with a (Count of a status) divided (by the count of Members). I was using ALL in the denominator earlier and of course that didn't work. Switched to ALLSELECTED and the Cards that show the Percent now work like a charm.
But I also use that Percent as a column in a table and in the table - ALLSELECTED uses the entire table as the denominator not the row - what do I need to change?
REPORTED_MEMBER_PCT = DIVIDE (
CALCULATE( DISTINCTCOUNT(TABLE1[MEM_ID]) ,TABLE2[STATUS] = "REPORTED" ) ,
CALCULATE( DISTINCTCOUNT(TABLE1[MEM_ID]) , ALLSELECTED( (TABLE1) ) ) )
comish4lif2 , Not very clear , Try like
REPORTED_MEMBER_PCT = DIVIDE (
CALCULATE( DISTINCTCOUNT(TABLE1[MEM_ID]) ,TABLE2[STATUS] = "REPORTED" ) ,
CALCULATE( DISTINCTCOUNT(TABLE1[MEM_ID]) , ALLSELECTED( (TABLE1[MEM_ID]) ) ) )
1 Reply
- amitchandak
Super User
comish4lif2 , Not very clear , Try like
REPORTED_MEMBER_PCT = DIVIDE (
CALCULATE( DISTINCTCOUNT(TABLE1[MEM_ID]) ,TABLE2[STATUS] = "REPORTED" ) ,
CALCULATE( DISTINCTCOUNT(TABLE1[MEM_ID]) , ALLSELECTED( (TABLE1[MEM_ID]) ) ) )