Extract unit Of Measure:
Example
diesel(KL)
water(mineral+waste)(KL)
wood(Tons)
Need to extract units of Measure like
KL
KL
Tons
Note: in water need to extarct only KL
Let me know if any one knows the logic
Extract unit Of Measure:
Example
diesel(KL)
water(mineral+waste)(KL)
wood(Tons)
Need to extract units of Measure like
KL
KL
Tons
Note: in water need to extarct only KL
Let me know if any one knows the logic
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amira BedhiafiPosted Jan 26, 2024, 6:32 PM
Try this :
Brahma Prakash ShuklaPosted Dec 26, 2023, 10:07 AM
To extract the units of measure from your examples, you can use a combination of DAX functions like
LEFT,RIGHT,FIND, andLEN. Assuming your data is in a column named "Product" in a table, here's a DAX query that can help you achieve this:This DAX query uses the
CONTAINSSTRINGfunction to check if the product description contains specific keywords like "(KL)" or "(Tons)". You can extend the conditions for other units of measure as needed.Please replace
[Product]with the actual column name in your table. If your data is in a different structure or format, you may need to adjust the logic accordingly.