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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Calculated Table

I am trying to create a caltualated summary that lists each date in my date table, each client and product that that client buys from my Client Products table and the highest single order quantity from my sales table. If the client didn't buy the product that day, list 1.

 

So in other words, my 3 existing tables are:

Client Products
ClientProduct
AX
AY
AZ
BX
BY
CX

 

Dates
Date
4/18/2018
4/19/2018

 

Sales
DateClientProductQty Sold
4/18/2018AX2
4/18/2018AX3
4/18/2018AZ2
4/18/2018BX2
4/18/2018BY2
4/18/2018CX2
4/19/2018AZ3
4/19/2018AZ4

 

And here's the output i want:

New Table
DateClientProductLargest Order
4/18/2018AX3
4/18/2018AY1
4/18/2018AZ2
4/18/2018BX2
4/18/2018BY2
4/18/2018CX2
4/19/2018AX1
4/19/2018AY1
4/19/2018AZ4
4/19/2018BX1
4/19/2018BY1
4/19/2018CX1
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks Greg! It didn't get me quite where i needed to be, but close. For reference, the solution is here:

 

https://community.powerbi.com/t5/Desktop/DAX-table-with-all-dates-products-clients-and-largest-purch...

 

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution in this workbook.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Thanks Ashish! Unfortunately I couldn't use the Dates table in the data model like you did in Excel because the Dates table was actually a calculated table. I probably should have specified that. For reference the solution is here:

 

https://community.powerbi.com/t5/Desktop/DAX-table-with-all-dates-products-clients-and-largest-purch...

Greg_Deckler
Community Champion
Community Champion

Try this:

 

New Table = SUMMARIZE(Sales,[Date],[Client],[Product],MAX([Qty Sold]))

BTW, excellently formed question with sample data that can be copied and pasted as well as expected output. Well done. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks Greg! It didn't get me quite where i needed to be, but close. For reference, the solution is here:

 

https://community.powerbi.com/t5/Desktop/DAX-table-with-all-dates-products-clients-and-largest-purch...

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.