Forum Discussion
More_BI
9 years agoFrequent Visitor
Switch function breaking my chart
Hey guys, I use the switch function in various measures to carefully toggle how the KPI will be implemented. For example, I have a column called "Rollup Type" which is tied to the list of KPIs. I...
MFelix
9 years agoSuper User
Hi More_BI,
The VALUES formula returns a list of values( see link with explanation) so you when you use it to return a single value to your visuals it will give you the error you have, since in the DAX measure the context of the measures are import for the final results, usually values is used in the filters or to sum other values.
Regards,
MFelix
More_BI
9 years agoFrequent Visitor
Interesting... that makes sense. So the values function overrrides the switch function, is that correct?
If I understand the switch function, it should return one value.
How is the max function working here? Does it only get one result back from the switch and therefore will always be the right value?