Forum Discussion
LD
6 years agoFrequent Visitor
Calculate % in a Col considering Condition
Dear All, Please, I would like to calculate the % of value "Yes" in a colum respect the total of other data. Es. COL 1 Yes No No No ...
- Anonymous6 years ago
Hi LD ,
Try this measure
Percent =var a = CALCULATE(Count('Table'[COL 1]), KEEPFILTERS('Table'[COL 1] = "YES"))var b = COUNTROWS(ALL('Table'))RETURNDIVIDE(a,b)Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Anonymous
6 years agoNot applicable
Hi LD ,
Try this measure
Percent =
var a = CALCULATE(Count('Table'[COL 1]), KEEPFILTERS('Table'[COL 1] = "YES"))
var b = COUNTROWS(ALL('Table'))
RETURN
DIVIDE(a,b)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)