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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
LMDV
Frequent Visitor

[ power BI ] quantity to sales with different price list per customer

Hi Team,

I'm new to DAX and was wondering what's the best way to accomplish the below.

What DAX code should I use?

 

Thank you!

 

@BA_Pete @m_dekorte I'd appreciate your help please?

quantity to sales with different price list per customer.png

 

 

1 ACCEPTED SOLUTION
qqqqqwwwweeerrr
Super User
Super User

Hi @LMDV 
you can acheive this by creating two new columns in both the table

Concat table = input_1[customer] & "-" & input_1[product] in table one
Concat table = input_2[customer] & "-" & input_2[product] in table 2
 
then make a connect between them 
qqqqqwwwweeerrr_0-1724138207279.png

then use this dax again for creating enw column in table one

Price = RELATED(input_2[Price])
 
then caculate sales 
Sales = input_1[Qty Sold]*input_1[Price]
 
qqqqqwwwweeerrr_1-1724138262444.png

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: www.youtube.com/@Howtosolveprobem

Regards

View solution in original post

2 REPLIES 2
qqqqqwwwweeerrr
Super User
Super User

Hi @LMDV 
you can acheive this by creating two new columns in both the table

Concat table = input_1[customer] & "-" & input_1[product] in table one
Concat table = input_2[customer] & "-" & input_2[product] in table 2
 
then make a connect between them 
qqqqqwwwweeerrr_0-1724138207279.png

then use this dax again for creating enw column in table one

Price = RELATED(input_2[Price])
 
then caculate sales 
Sales = input_1[Qty Sold]*input_1[Price]
 
qqqqqwwwweeerrr_1-1724138262444.png

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: www.youtube.com/@Howtosolveprobem

Regards

that worked, thank you! @qqqqqwwwweeerrr 

question -- from a processing runtime point of view, is the above process using DAX faster than using Merge in PowerQuery?


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.