Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello all, my problem is the following.
I have a data sheet with the following columns:
One characteristic in “plant” can have several characteristics in “customer”
One characteristic in “Customer” can have several characteristics in “PN”.
I created a data model from this excel table (because I needed the "discrete count" for the pivot table field setting). In this data model I created a pivot table. The pivot table has the “plant” column and the “customer” column as lines, with the “plant” being the first column and “customer” being the second. In the values of the pivot I have the sum of “Qty” and the discrete count of “PN” for each characteristic of “customer” per characteristic of “plant”. I then created a measure called “Avg” that divides the column “Qty” by the column “ PN” per line, which gives me the average number of delivered parts per unique part number.
In this data model I want to create another measure in the pivot table. The measure shall divide the value of "Avg" per characteristic of "Customer" by the subtotal of the "Plant" column for all characteristics of "Customer".
How do I write this measure?
Please see the table below for visualization. The column "Share of Plant average (Measure)" is what I want to create with a measure in the pivot.
The measure "Avg Qty per PN (Measure)" is calculated by dividing "Sum of Qty" by "Count of PN". The measure I want to replicate in Excel data model / DAX is "Share of Plant average (Measure)". It is calculated by dividing the "Avg Qty per PN (Measure)" by the subtotal of the respective plant. In the first line, it's calculated by dividing 3.333 by 4.500.
Plant | Customer | Sum of Qty | Count of PN | Avg Qty per PN (Measure) | Share of Plant average (Measure) |
1 | A | 10.000 | 3 | 3.333 | 74% |
1 | B | 20.000 | 5 | 4.000 | 89% |
1 | C | 15.000 | 2 | 7.500 | 167% |
1 subtotal | 45.000 | 10 | 4.500 | ||
2 | C | 10.000 | 8 | 1.250 | 57% |
2 | D | 8.000 | 5 | 1.600 | 73% |
2 | E | 15.000 | 2 | 7.500 | 341% |
2 subtotal | 33.000 | 15 | 2.200 | ||
3 | A | 9.000 | 4 | 2.250 | 129% |
3 | D | 10.000 | 8 | 1.250 | 71% |
3 | F | 13.000 | 3 | 4.333 | 248% |
3 | G | 12.000 | 9 | 1.333 | 76% |
3 subtotal | 35.000 | 20 | 1.750 |
Solved! Go to Solution.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
I changed the pictore with the actual table. At first I used a table, but it somehow was distorted after inserting, so I changed it to a screenshot.
User | Count |
---|---|
21 | |
19 | |
12 | |
9 | |
8 |
User | Count |
---|---|
31 | |
27 | |
15 | |
13 | |
10 |