Forum Discussion
Dynamic Column calculation based on Slicer multiple selection
- Anonymous8 years ago
I find a help as a part of the solution in this post by applying the provided formula like this (it is an example) :
After Loss Date = CALCULATE(SUM(CashFlows[CashFlow])*(1-[Loss_Select]), FILTER(ALLSELECTED(CashFlows),CONTAINS(ALLSELECTED(DimDeals),DimDeals[Deal_Index],CashFlows[Deal_Index])), FILTER(ALL(CashFlows),[Deal_Index]=MAX([Deal_Index])&&CashFlows[Date]>[Date_Loss_Select]))
Contains seems to be help a lot.
The only remained thing is that a slicer can not apply accross reporting
I carry on digging this point.
Regards,
Ph
Hi,
It use the parameter table pattern below:
To get the selected value, use the VALUES function in the measure that uses the parameter. Usually you check the selection of one value only. If the selection is of all the parameters, it is like there is no selection at all and, in this case, you can return a default value. If the selection has more than one but not all parameters, you might consider this case as a multiple selection, which in most cases may be an invalid selection. The following code represents the complete pattern that you see applied later in more pattern examples.
1 2 3 4 5 6 7 8 9 10 | ParameterSelection := IF ( HASONEVALUE ( Parameter[ParameterValue] ), "Selection: " & VALUES ( Parameter[ParameterValue] ), IF ( NOT ( ISFILTERED ( Parameter[ParameterDescription] ) ), "No Selection", "Multiple Selection" ) ) |
Link from:
http://www.daxpatterns.com/parameter-table/
Regards,