Forum Discussion
BrianNeedsHelp
1 year agoResolver I
New Column With Switch Statement Errors
I have this Switch Statement that I put in a measure and it works fine in the measure for showing the results of "Low", Med", High". But I wanted to use the same formula in a column so that I could ...
SachinNandanwar
1 year agoImpactful Individual
Define a new range table say RangeTable with the following columns and values
Display | Min | Max
"Low" | 1 | 45
"Mid" | 46 | 70
"High" | 71 | 1000000000 (Or any other maximum value)
And then use the following in your calculated column :
CALCULATE (
VALUES ( 'RangeTable '[Display] ),
FILTER (
'RangeTable',
'YourTable'[Gross Adds] >= 'RangeTable'[Min]
&& 'YourTable'[Gross Adds] <= 'RangeTable'[Max]
)
)and also your formula has an error.
When the "Gross Adds" has a value of 45 it would satisfy condition for both Low and High
[Gross Adds]<=45,"Low",
[Gross Adds]>=45 || [Gross Adds]<=70,"Mid",
[Gross Adds]>70, "High"