cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LinuxFish
Frequent Visitor

Add Units from Unit of Measure Table

I have a report I'm trying to create where there are mixed units of measurement based on which product is shipped.

 

Some of our products have a measurement of Gallons, some Lbs, and some Each. I have a table relating product, size, unit of measure, and conversion from each shipped to the associated unit of measure. I created a calculated column on the sales table "Shipped UOM = [Shipped Qty] * RELATED('Product UOM'[UOM per Piece])". I would like graphics to display 50 Gallons or 2 Lbs instead of 50 or 2 (depending on the product measurement unit).

 

I've tried changing the format of the column to "###,RELATED('Product UOM'[UOM])", but this only displays "RELATED('Product UOM'[UOM])" for every value instead of the quantity with units.
 
I've also tried using the FORMAT dax command, but this makes the data in the format of text which makes it difficult to sum gallons / lbs by product or month.
 
I saw it's possible to use units of measure of thousands, millions, etc. but I can't find how to add units to a matrix or chart. Adding the units as a tooltip gives me options of first UOM or count of UOM, neither of which is useful in this case.
 
Subset of Product UOM Table
LinuxFish_0-1675356582636.png

 

Subset of Sales Table

LinuxFish_1-1675356632432.png

 

Relationships in the Model

LinuxFish_2-1675356742977.png

 

1 REPLY 1
lbendlin
Super User
Super User

Read about Calculation Groups and the formatting options there.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors