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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.