Forum Discussion
Dax Switch Calculation not working as expected
- 1 year ago
Hi cruncher
Thank you for the follow-up questions.
Since this has already been implemented using Field Parameters but is not filtering dynamically, I would recommend submitting this scenario as a feature request in the official Power BI Ideas forum.
The Product Team actively reviews suggestions there, and if others in the community upvote it, it may be considered for future updates.
https://ideas.fabric.microsoft.com/
I trust this information proves useful. If it does, kindly “Accept as solution” and give it a 'Kudos' to help others locate it easily.
Thank you.
Hi cruncher
Measures must return a single value, known as a scalar. Since columns or tables are not scalar values, you need to wrap fields like region and country in an aggregation function such as MIN, MAX, AVERAGE, or SUM to return a valid result. For example:
SWITCH (
TRUE (),
country_count = 1 , MAX ( 'table'[region] ),
MAX ( 'table'[country] )
)