Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Harry41
Regular Visitor

Hierarchical Count

Hi all,

 

I'm trying to create a chart (either donut or 100% stacked bar) to show the most severe level incident for a case. I have 2 tables, one containing a caseID and basic case info, and another containing an incidentID, the caseID it relates to and basic incident info. The issue is the fact that 1 case often has more than one incident, with differing severity (Minor, Major, Severe), with some cases having 0 incidents.

 

I've tried making a new column in the case table, which looks in the incidentID table for Severe events, then Major, then Minor, but I cannot figure out how to get this to work.

 

Any ideas?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Harry41 , Based on what I got

 

new column in case table =
var _1 = maxx(filter(events,events[Case ID] = Case[Case ID] && [severity] = "Severe"), [incidentID])
var _2 = maxx(filter(events,events[Case ID] = Case[Case ID] && [severity] = "Major"), [incidentID])
var _3 = maxx(filter(events,events[Case ID] = Case[Case ID] && [severity] = "Minor"), [incidentID])
return
coalesce(_1,_2,_3)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Harry41 , Based on what I got

 

new column in case table =
var _1 = maxx(filter(events,events[Case ID] = Case[Case ID] && [severity] = "Severe"), [incidentID])
var _2 = maxx(filter(events,events[Case ID] = Case[Case ID] && [severity] = "Major"), [incidentID])
var _3 = maxx(filter(events,events[Case ID] = Case[Case ID] && [severity] = "Minor"), [incidentID])
return
coalesce(_1,_2,_3)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.