Forum Discussion
juanroblesoct9
4 years agoFrequent Visitor
Query from Service Pack using SummarizeColumns and add a column with Switch (Case When in SQL)
Trying to get data using this query adding Switch function similar as case when using switch but not working. EVALUATE SUMMARIZECOLUMNS ( 'Geo Hierarchy'[Country], 'Prod Hierarchy'[Product Lvl...
Greg_Deckler
4 years agoCommunity Champion
juanroblesoct9 Try:
SWITCH('Prod Hierarchy'[Product Lvl 7],"Play","Play",
"Run","Run",
"Others"
),
If a measure, you may have to use an aggregation around your column, if it is a column.
- juanroblesoct94 years agoFrequent Visitor
Is a column as want to replicate case when in SQL.
The sugestion is not working.
the error shown "A single value for column "Prod Lvl7" in table "Prod Hierarchy" cannot be determined. This happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count...