Forum Discussion
Help needed with DAX Switch Statement multiple columns (Picture included)
The first table should be remodelled to be :
Region, Lower Limit, Upper Limit, Rating.
You can then write a measure or column to retrieve the Rating based on Region, lower limit < Sales and upper Limit >= Sales
- yuj1784 years agoFrequent Visitor
HotChilli Just wanted to clairfy that the first table is not actually a table in SQL server, its like a seperate PDF document by the guys in HR.
I have experimented with the following DAX code, but it doenst seem to work
Grading =
SWITCH (
TRUE(),
Sheet1[Regions] = "West" && Sheet1[Sales Amount for the Month] > "30" && Sheet1[Sales Amount for the Month] <= "35", "Very Satisfactory"
Sheet1[Regions] = "West" && Sheet1[Sales Amount for the Month] > "25" && Sheet1[Sales Amount for the Month] <= "30", "Satisfactory"
The statements dont seem to work and will take a while to be entered, I just wanted to know if there are any issues with teh SWITCh statements are written or if there is a better way to do this rather than typing it out the conditions manually.