Forum Discussion
Anonymous
3 years agoNot applicable
ALLSELECTED not working with multiple selected values.
I have a table with online order data. Here is a sample: Order_nbr, Item_nbr, channel, prod_cost, prod_cost_packaging 1 , 2 , Pickup , 10 , 0.4 2 ...
Jihwan_Kim
Super User
3 years agoHi,
I am not sure how your datamodel looks like, but please try something like below.
Expected result measure: =
VAR Flowpath_choice =
SELECTEDVALUE ( Table[Channel] )
RETURN
SWITCH (
TRUE (),
Flowpath_choice IN { "Delivery" }, [Actual Amount],
Flowpath_choice IN { "Pickup", "Vendor" }, [Package Amount],
0
)
- Anonymous3 years agoNot applicable
This gets rid of the error. But this isn't an actual solution. I have a slicer on the channel field for the table; when I select 2 or more channels, the measure should display the sum of all channel costs (whether packaging or prod_cost). The above solution gets rid of the error but doesn't support the actual multiple selection of the channels.