Forum Discussion
kovacikm78
1 year agoFrequent Visitor
Order a column by using slicer selection from another table
Hi guys, can somebody help me with this issue? I need to order product type based on slicer selection channel from another table. If I choose eshop, I want my product type order by column index esh...
- 1 year ago
Hi kovacikm78
Add a measure to your model using the following DAX:
DynamicSortIndex = VAR SelectedChannel = SELECTEDVALUE(FACT_Sales[Channels]) RETURN SWITCH( TRUE(), SelectedChannel = "B&M", MAX(DIM_Product[Index B&M]), SelectedChannel = "eshop", MAX(DIM_Product[Index eshop]), MAX(DIM_Product[Index B&M]) -- Default or when no selection is made )If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
VahidDM
1 year agoSuper User
Hi kovacikm78
Add a measure to your model using the following DAX:
DynamicSortIndex =
VAR SelectedChannel = SELECTEDVALUE(FACT_Sales[Channels])
RETURN
SWITCH(
TRUE(),
SelectedChannel = "B&M", MAX(DIM_Product[Index B&M]),
SelectedChannel = "eshop", MAX(DIM_Product[Index eshop]),
MAX(DIM_Product[Index B&M]) -- Default or when no selection is made
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!