Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

SUMX dynamically filtered by slicer

Hello everyone   I have a table of incidents with multiple columns about  the incident (ticket number, date, time, countries affected, impact time, type of impact, root cause, etc...) On the other...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,
    Thank you for reaching out to Microsoft Fabric community forum.

    Create the disconnected slicer table
    RootCauseFilter =
    DATATABLE(
    "FilterOption", STRING,
    {
    {"Include External Conditions"},
    {"Exclude External Conditions"}
    }
    )

    Add the slicer visual
    Use - RootCauseFilter[FilterOption] as the field.
    User can now choose to Include or Exclude External Conditions

    Create the dynamic measure

    Dynamic Impact_sg =
    VAR SelectedOption = SELECTEDVALUE('RootCauseFilter'[FilterOption], "Include External Conditions")
    VAR IsExclude = SelectedOption = "Exclude External Conditions"

    RETURN
    SUMX(
    GROUPBY(
    FILTER(
    'Table_of_Incidents',
    NOT(IsExclude) || 'Table_of_Incidents'[Root Cause] <> "External Conditions"
    ),
    'Table_of_Incidents'[Impacted Service],
    'Table_of_Incidents'[Bussiness Process],
    'Table_of_Incidents'[SLA Impact sg],
    'Table_of_Incidents'[Impact Type],
    'Table_of_Incidents'[Affected Panels],
    'Table_of_Incidents'[Affected Countries]
    ),
    'Table_of_Incidents'[SLA Impact sg]
    )


    Add a card or table to show output

    Drag in the Dynamic Impact measure.

    Select slicer option and watch values update:

    Include - Includes all rows.

    Exclude - Excludes those with Root Cause = External Conditions.


    Please find the attached .pbix file for your reference.

    Regards,
    Sreeteja.