Forum Discussion
sharpedogs
6 years agoAdvocate II
Calculated Column maybe?
I am looking to create a new column based on two other columns. One of the data fields I am getting is incorrect so I need to correct it.
I have 6 different ISP ID's, and I want the new column to say
(If ISP ID = 123.456.556 Then Multiple the (Output) column by 1,000)
(If ISP ID = 123.556.789 Then just carry over the OutPut column)
| ISP ID (Text) | Output (Number) | End Result... |
| 123.456.556 | 0.987 | 987 |
| 223.556.767 | 1.23 | 1,230 |
| 123.556.789 | 1.35 | 1.35 |
- Anonymous6 years agoCalculated column=switch(true(),table[id]="value1",table[output]*1000,table[output])
You can added multiple conditions as well by placing comma after 1000 and new condition and new output for condition...follow switch dax syntax.
But my recommendation is create Calculated column in power query for better performance with large datasets.
Thanks
Pravin
1 Reply
- AnonymousNot applicableCalculated column=switch(true(),table[id]="value1",table[output]*1000,table[output])
You can added multiple conditions as well by placing comma after 1000 and new condition and new output for condition...follow switch dax syntax.
But my recommendation is create Calculated column in power query for better performance with large datasets.
Thanks
Pravin