Forum Discussion
Convert units
- 5 years ago
Hey Saxon10 ,
for each of the 3 columns (Lenght, Width and Height) add a calculated column:
Length in Meter = SWITCH( MyTable[UOM Dimension], "M", MyTable[Length], "CM", MyTable[Length] / 100, "MM", MyTable[Length] / 1000 )Same formula for the other 2 measures 😉
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.bi
Hey Saxon10 ,
for each of the 3 columns (Lenght, Width and Height) add a calculated column:
Length in Meter =
SWITCH(
MyTable[UOM Dimension],
"M", MyTable[Length],
"CM", MyTable[Length] / 100,
"MM", MyTable[Length] / 1000
)
Same formula for the other 2 measures 😉
- Saxon105 years agoPost Prodigy
Thanks for your qucik reply. I am receving error here Exprssions that yield variant data-type cannot be used to define calulated column.
Those three columns came from as a calculate column and those three column are stored as a text so can you please help me.
- v-xulin-mstf5 years agoCommunity Support
- Saxon105 years agoPost Prodigy
Thanks for the your reply. Now the problem is fixed and approved the solution
- selimovd5 years agoMost Valuable Professional
Hey Saxon10 ,
can you check if the [Length] column is from the format decimal number?
Is the column [UOM Dimension] from the format Text?
Can you post a screenshot?
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.bi- Saxon105 years agoPost Prodigy
Hi,
Thanks for your reply. Yes, you are right the length column is not number format that's the reason I got error. If I convert into number then everything is fine.