Forum Discussion
AndrewMcCorkell
3 years agoFrequent Visitor
Creating a calculated measure using criteria from another table
Hi all I have a table where redemption data for multiple gift card merchants is stored, along with the redemption values, dates etc. I'm trying to create a visual where I can select one or more o...
Greg_Deckler
Community Champion
3 years agoAndrewMcCorkell So, I would do this with the disconnected master table you describe but create another disconnected table with just the values "Selected" and "Other". Use this as the axis in a visual. You can then get the SELECTEDVALUE from your slicer table in a measure like this:
Measure =
VAR __Merchant = SELECTEDVALUE('SlicerTable'[Merchant])
VAR __Type = MAX('ParameterTable'[Value]) // this is either Selected or Other
RETURN
SWITCH(__Type,
"Selected",SUMX(FILTER('Table',[Merchant] = __Merchant),[Value]),
SUMX(FILTER('Table',[Merchant] <> __Merchant),[Value])
)