Forum Discussion
Redraidas1
5 years agoHelper I
Switch statement error
Does anybody know why I'm getting this error message for the below SWITCH statement and how to make it work? Thanks!
Error: 'The expression specified in the query is not a valid table expression'
Measure =
SWITCH (
TRUE(),
'Conversion Rates v2'[M_Conversion] = 1, GENERATESERIES(0, 10000, 10),
'Conversion Rates v2'[M_Conversion] <1, GENERATESERIES(0, 100000, 100),
'Conversion Rates v2'[M_Conversion] <0.1, GENERATESERIES(0, 1000000, 1000),
'Conversion Rates v2'[M_Conversion] <0.001, GENERATESERIES(0, 10000000, 10000)
)
2 Replies
- camargos88Community Champion
GENERATESERIES returns a table, measures have to return scalar values.
What are you trying to do ?
- amitchandakSuper User
Redraidas1 , if trying to slicer value of 'Conversion Rates v2'[M_Conversion], that is not possible in case when you are creating a table.