Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have the folloiwng sample data set...
I need to calculate Max Sales of Customer by the part number and figure out what % of their sales are in the top customer. I have Part Number, Customer, and Sales in my data set... how do I calculate the next 2 in dax?
Hi, @nschmidt
Please check the below measures.
The link to the sample pbix file is down below.
Max Sales of Customer by Part No =
IF (
HASONEVALUE ( 'Table'[Part Number] ),
CALCULATE (
MAXX ( 'Table', 'Table'[Sales] ),
ALLEXCEPT ( 'Table', 'Table'[Part Number] )
),
BLANK ()
)
Percentage of Max =
IF (
HASONEVALUE ( 'Table'[Part Number] ),
DIVIDE (
[Max Sales of Customer by Part No],
CALCULATE (
SUMX ( 'Table', 'Table'[Sales] ),
ALLEXCEPT ( 'Table', 'Table'[Part Number] )
)
),
BLANK ()
)
https://www.dropbox.com/s/3g8nnszt7p0x46e/nschmidt.pbix?dl=0
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.
Sorry i should have specified... customer and sales are on different tables with one way relationships Customer points to Sales, Part number points to sales as well