Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Combine DAX measure with units column?

I have a calculated measure in DAX for Total Sales of various items in the form of:

Sales = SUM(ExtendedPrice) 

Each granular row in my data also has a Unit of Measure stored in a separate column named 'UOM' (LBS, Tons, CF, etc) . How do I present the measure 'Sales' and have the appropriate units concatenated to it so it displays as '100 LBS', '300 Tons', '400 CF' etc?

Thanks

 

 

5 REPLIES 5
Vinodkumarj
New Member

Hi Datazen,

Did you find the solution for the question you raised?

Now I am having same requirement in on of my report. If you found solution please share the measure.

 

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please correct me if I wrongly understood your question.

Please try something like the below.

 

Picture13.png

 

Sales =
FORMAT (
IF ( ISFILTERED ( 'Table'[uom] ), SUM ( 'Table'[extendedprice] ) ),
"#,##0.00"
) & " "
& SELECTEDVALUE ( 'Table'[uom] )
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thanks Jihwan. I aprecaite your effort. 

I get a memory error when trying a simliar pattern. I wanted to keep my post simple so I should say that my 'Sum' is actually a CALCULATE(SUM...) with a condition. Also, the numeric part of the result needs to be turned to a STRING before the concatenation can be done with UOM. Not only that but once it is turned into a STRING the measure can't be referenced in subsequent calculations. I was hoping for some smooth way that Power BI would concatenate the units while keeping my result as a number. 

Hi, @Anonymous 

Thank you for your feedback.

If you create a calculation group and format those by using a Tabular editor in Power BI, it will be still a number. The format can be customized row by row, if you want.

If you can share your sample pbix file's link here, I can try to look into it and come up with a more accurate solution.

Thank you.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
amitchandak
Super User
Super User

@Anonymous , You have to make sure UOM is part of visual

 

Sales = SUM(ExtendedPrice) & max([UOM])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.