Forum Discussion
Reduce data by adding new column
- 6 years ago
Your check is for a singel value > 58.42 which your hightlighted row is not.
Anonymous
I think this is along the lines of what you are looking for. It is a calculated column on the table.
Check =
SWITCH (
TRUE(),
'Table'[Length] > 23 || 'Table'[Width] > 23 || 'Table'[Height] > 23, "One over 23",
('Table'[Length] > 14 && 'Table'[Width] > 14) || ('Table'[Width] > 14 && 'Table'[Height] > 14) || ('Table'[Height] > 14 && 'Table'[Length] > 14), "Two over 14",
'Table'[Length] > 11 && 'Table'[Width] > 11 && 'Table'[Height] > 11, "Three over 11",
"good"
)
- Anonymous6 years agoNot applicable
I must be doing something wrong as I get errors in mine
I copy and pasted the following:
Check =
SWITCH (
TRUE(),
'Table'[UOM_LENGTH] > 23 || 'Table'[UOM_WIDTH] > 23 || 'Table'[UOM_HEIGHT] > 23, "One over 23",
('Table'[UOM_LENGTH] > 14 && 'Table'[UOM_WIDTH] > 14) || ('Table'[UOM_WIDTH] > 14 && 'Table'[UOM_HEIGHT] > 14) || ('Table'[UOM_HEIGHT] > 14 && 'Table'[UOM_LENGTH] > 14), "Two over 14",
'Table'[UOM_LENGTH] > 11 && 'Table'[UOM_WIDTH] > 11 && 'Table'[UOM_HEIGHT] > 11, "Three over 11",
"good"
)Can you add a screen shot of you custom column dialogue box?
- jdbuchanan716 years agoSuper User
Is your table named 'Table'? If not then you have to change my measure to match the name of the table in your model.
Or you can take the table reference out of the formula:
Check = SWITCH ( TRUE(), [UOM_LENGTH] > 23 || [UOM_WIDTH] > 23 || [UOM_HEIGHT] > 23, "One over 23", ([UOM_LENGTH] > 14 && [UOM_WIDTH] > 14) || ([UOM_WIDTH] > 14 && [UOM_HEIGHT] > 14) || ([UOM_HEIGHT] > 14 && [UOM_LENGTH] > 14), "Two over 14", [UOM_LENGTH] > 11 && [UOM_WIDTH] > 11 && [UOM_HEIGHT] > 11, "Three over 11", "good" )- Anonymous6 years agoNot applicable
I changed the name but I still get an error, see my screenshot