Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I'm dealing with incident classifications and trying to find out how many times a given type of incident was misclassified, based on a table that has multiple followup comments per incident. For instance, in the example below, I'm trying to find out how many incidents with the cause "NONE" contained comments that mention water.
The tables are related on the WorkOrder field, one to many.
I've written a measure, but it only gives me the total number of WorkOrders containing "water" in the comments field, even if I try to break it down by CauseCode:
Solved! Go to Solution.
Hi @ReadTheIron ,
Please try these two measure to do that.
Total Incidents =
DISTINCTCOUNT ( CommentsTable[WorkOrder] )
watercount =
CALCULATE (
DISTINCTCOUNT ( CommentsTable[WorkOrder] ),
FILTER ( 'CommentsTable', CONTAINSSTRING ( [Comments], "water" ) )
)
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ReadTheIron ,
Please try these two measure to do that.
Total Incidents =
DISTINCTCOUNT ( CommentsTable[WorkOrder] )
watercount =
CALCULATE (
DISTINCTCOUNT ( CommentsTable[WorkOrder] ),
FILTER ( 'CommentsTable', CONTAINSSTRING ( [Comments], "water" ) )
)
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! This worked perfectly - and helped me identify a big problem with our data. You've really helped me out!
Does this work:
WorkOrder | CauseCode | Date |
A001 | Wind | 1/1/2022 |
A002 | None | 1/2/2022 |
A003 | Fire | 1/3/2022 |
A004 | None | 1/3/2022 |
A005 | Water | 1/4/2022 |
A006 | None | 1/5/2022 |
WorkOrder | Comments |
A001 | Fixed wind trouble |
A002 | Problem not found |
A002 | Water leak |
A003 | Fixed fire trouble |
A004 | Water leak found |
A004 | Fixed water leak |
A005 | Fixed water leak |
A006 | Problem not found |
can you provide the data in text format?
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.