March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a table and column InjuryTracker[Mechanism of Injury]. There’s maybe 10 different values in this column with 120 rows. I want to figure out from the total entries in this column how many have the value “Slip Trip Fall”, “Struck-by”, and “Lifting”
Then I want to know what % those are of the total entries in the column
In excel I’d do a countifs but not sure with Power BI. I think I need to create a new measurement but I don’t know the formula structure for those.
Thanks!
Solved! Go to Solution.
Try the below measure:
DIVIDE(
CALCULATE(
Countrows(InjuryTracker),
InjuryTracker = "Slip Trip Fall" ||
InjuryTracker = "Struck-by" ||
InjuryTracker = "Lifting”
)
,
CALCULATE(
Countrows(InjuryTracker),
All(InjuryTracker[Mechanism of Injury])
)
,
0
)
Try the below measure:
DIVIDE(
CALCULATE(
Countrows(InjuryTracker),
InjuryTracker = "Slip Trip Fall" ||
InjuryTracker = "Struck-by" ||
InjuryTracker = "Lifting”
)
,
CALCULATE(
Countrows(InjuryTracker),
All(InjuryTracker[Mechanism of Injury])
)
,
0
)
Awesome, thanks! I had to add the column name after the table name in the count rows function.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
86 | |
77 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |