Forum Discussion
Count the frequency of a boolean value
- 9 years ago
Hey,
Last night I had a brainwave and jumped out of bed and got it working using the following formula:
TrueCount = COUNTAX(FILTER('Table',[Element_A]=TRUE()),TRUE())Thanks for the additional inputs as well, I will have a play with those other suggestions to see how else I might be able to solve the problem.
Well, depends on whether his true/false columns are text or boolean. You can't directly COUNT true/false columns if that's what he has. You can solve that by adding in Index field in the query and counting that instead but either method should work. And using the TRUE() function in place of "True".
Hey,
Last night I had a brainwave and jumped out of bed and got it working using the following formula:
TrueCount = COUNTAX(FILTER('Table',[Element_A]=TRUE()),TRUE())
Thanks for the additional inputs as well, I will have a play with those other suggestions to see how else I might be able to solve the problem.
- wmjhca7 years agoFrequent Visitor
Worked like a charm for me! Thanks!!!
- Bhavana_k7 years ago
Helper I
Hi,
My scenario is something similar but I have many conditions. Like below
if category="Good" then count(Column)else if category = "bad" then count(Column)
else if category ="neutral" then count(Column)
else
blank()
END
How do i do this?
I tried it with if and switch condition but its not working.
CheckCount =
IF([Category]="Danger",COUNT(Table1[Column1]),
IF([Category]="Bad",COUNT(Table1[Column1]),
IF([Category]="Good",COUNT(Table1[Column1]),
IF([Category]="Neutral",COUNT(Table1[Column1]),
IF([Category]="very Good",COUNT(Table1[Column1])
,BLANK())
) ) ) )
And this category is a measure which I have made. But now i just want a count of these categories so i can make some pie ot donought chart.
Thank you,
Bhavana