Forum Discussion
jayjani
6 years agoHelper I
Measures Filters
Hello, I created a table in PBI as shown below. I created all flag fields by writing measures such as Price Flag = IF([Price]>=CALCULATE([Price], ALLSELECTED(Table[SKU]), "Avg or Above", "Below A...
Anonymous
6 years agoNot applicable
HI jayjani,
Measure formulas are calculated expressions that calculated based on current row contents and categories, it was not to use as the category to expand other fields. (slicer require static fields that measure formula not suitable for its requirement).
Currently, you can only use measure on 'visual level filter' to filter records.
If you want to direct choose measure results on the slicer, you need to create a table with measure formula results and coding measure filters based on its selection.
New tables:
FlagPrice =
SELECTCOLUMNS ( { "Above Avg", "Below Avg" }, "Flag", [Value] )
FlagDisc = FlagPrice
FlagMargin = FlagPrice
Measure filters use on the visual level filter to choose 1 result:
PriceFilter=
IF([Price Flag] in allselected(FlagPrice[Flag]),1,blank())
DiscFilter=
IF([Price Flag] in allselected(FlagDisc[Flag]),1,blank())
MarginFilter=
IF([Price Flag] in allselected(FlagMargin[Flag]),1,blank())
Regards,
Xiaoxin Sheng