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
TBD
The total count is 5 with 1 Yes; so.... [(1/5) * 100]
Thank you
LD
- 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)
1 Reply
- AnonymousNot applicable
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)