Forum Discussion
Oros
4 years agoPost Prodigy
Multiple if statement for a column
Hello.
I have a table with 3 columns. I would like the 3rd column to have all the values in KG (converted to KG). How do you query or create a column to accomodate all the if statements? Thanks.
Oros , A new column like
Switch([Unit],
"KG", [Weight],
"gram", [Weight]/1000 ,
// add others
[weight] //default value
)
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
Thanks amitchandak
2 Replies
- amitchandakSuper User
Oros , A new column like
Switch([Unit],
"KG", [Weight],
"gram", [Weight]/1000 ,
// add others
[weight] //default value
)
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
- OrosPost Prodigy
Thanks amitchandak