Forum Discussion
amsoares
4 years agoRegular Visitor
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 :
| Capacity | Offline | Type |
| 300 | 100 | Planned |
| 350 | 200 | Unplanned |
| 200 | 100 | Planned |
| 350 | 350 | Unplanned |
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
- amsoaresRegular 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]))