Forum Discussion
Creating Column Chart, Counting If Yes,
- 8 years ago
Yeah, I guess that the default action of Power BI would just be to count all. If you make a measure similar to what I wrote in my previous post for each of your four columns, it should work as they'll only consider rows where the relevant column contains yes.
What exactly are you feeding into the visual? Are you putting in a measure that has something like BehaviouralCount = calculate(countrows[yourtable],Behavioural="Yes"), or something else?
I think that's just it, I don't know what I'm doing :( I've just created the chart and dragged my columns into it. I'm trying to adjust the filters, but I'm thinking I need to use measures?
- jthomson8 years agoSolution Sage
Yeah, I guess that the default action of Power BI would just be to count all. If you make a measure similar to what I wrote in my previous post for each of your four columns, it should work as they'll only consider rows where the relevant column contains yes.
- patri0t828 years agoPost Patron
I really appreciate your help - would you be able to explain the syntax of your formula a bit? Which part is the Exact column header, etc.?
- patri0t828 years agoPost Patron
Ahh, I tried this and it seems to be working
HazardCount = calculate(countrows(SafetyLink),SafetyLink[Did you complete a Hazard Elimination]="Yes")
Thanks so much!