Forum Discussion

amsoares's avatar
amsoares
Regular Visitor
4 years ago
Solved

USING CONCATENATEX IN MULTIPLE SLICER SELECTION AND APPLY AS A CRITERIA FOR CALCULATION

I'm trying to implement a calculation based on as criteria defined by a slicer selection. I have a table with data similar to this one :

 

CapacityOfflineType
300100Planned
350200Unplanned
200100Planned
350350Unplanned

 

And I wanted to calculate the sum of "Offline" base on slicer using the "Selector" table below :

Type
Planned
Unplanned

 

I'm using the following code for the measure :

 

Offline_Type =
CALCULATE(
    SUM('Table1'[Offline]),
    'Table1'[Type]
        IN {SELECTEDVALUE(Selector[Type],"")}
)
It works fine for single selection, but I get no results if I have multiple selection. Any ideas what is wrong ?
Ps.Filtering doesnt work in this case since I also want to calculate sum of "Capacity" independently of the slicer selection.
Thank you!
  • I figured what was the problem , this works fine :

    Offline_Type =
    CALCULATE(
        SUM('public bi_final_timeseries'[offline_cap_offline]),
        'public bi_final_timeseries'[offline_outage_typ]
            IN ALLSELECTED(Outage_Type[Outage_Type])
    )

1 Reply

  • amsoares's avatar
    amsoares
    Regular Visitor

    I figured what was the problem , this works fine :

    Offline_Type =
    CALCULATE(
        SUM('public bi_final_timeseries'[offline_cap_offline]),
        'public bi_final_timeseries'[offline_outage_typ]
            IN ALLSELECTED(Outage_Type[Outage_Type])
    )