Forum Discussion

Harry41's avatar
Harry41
Frequent Visitor
4 years ago
Solved

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 anothe...
  • amitchandak's avatar
    4 years ago

    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)