Forum Discussion
Anonymous
2 years agoNot applicable
SELECTED VALUE Filters
Hi All, I have the below syntax. The 'Dimension'[Dimension Fields] is a field parameter. I want to filter based on the field dimension and return the calculation from the fields. SWITCH TOP10 ...
rajendraongole1
2 years agoSuper User
Hi Anonymous - Small adjustment in SWITCH function to properly handle the selection of dimension fields and return the corresponding calculation
SWITCH TOP10 =
SWITCH(
SELECTEDVALUE('Dimension'[Dimension Fields]),
"Orange", CALCULATE([Top 10 - Orange]),
"Apple", CALCULATE([Top 10 - Apple]),
"Grapes", CALCULATE([Top 10 - Grapes]),
"Pineapple", CALCULATE([Top 10 - Pineapple]),
"Avocado", CALCULATE([Top 10 - Avocado]),
BLANK() -- Default value if none of the conditions are met
)
Try the above and let know
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!