Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
45 | |
26 | |
22 | |
13 | |
8 |
User | Count |
---|---|
73 | |
51 | |
45 | |
16 | |
12 |