Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Searching column for values < 2000

Hi,

 

I am having trouble creating a calculated column, where I search another column for values < 2000.

 

IF < 2000, then it shall return "Home" and IF > 2000, then "Out".

 

I have tried something like this

     _Out_Home =
           IF(Value('DM_Employee'[PersiumOrgID]) < 2000, "Home", "Out")

The column consists of non unique IDs in text format, which is why I use the Value function.

When i do this it says: " Cannot convert value '' of type Text to type Number. "

 

I have also tried this:

_Out_Home =    
CALCULATE('DM DimEmployee',
      FILTER('DM DimEmployee', 'DM DimEmployee'[PersiumOrgID] < 2000)
This gives me the fault message: "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
 
The data is confidential, but the column looks something like this:
 
PersiumOrgID
1345
1345
1345
1423
1464
1476
1488
1488
1488
1502
2012
2045
2045
2045
2062
2078
 
Hope you can help, thanks 🙂

 

2 Replies