Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I'm struggling with the sum of quantities per partnumber. Our machines have framenumbers and those machines are build with parts. I would like to sum the parts in an overview.
This is the data:
| Framenumber | PartNumber | Quantity |
| 01504M | 112455 | 2 |
| 01504M | 238574 | 22 |
| 01504M | 598749 | 5 |
| 01504M | 254875 | 4 |
| 01504M | 254152 | 11 |
| 01504M | 658745 | 23 |
| 01504M | 158965 | 1 |
| 01504M | 128544 | 45 |
| 01504M | 123659 | 7 |
| 01504M | 128588 | 9 |
| 01504M | 124588 | 2 |
| 01605D | 112455 | 2 |
| 01605D | 238574 | 22 |
| 01605D | 598749 | 5 |
| 01605D | 254875 | 4 |
| 01605D | 254152 | 11 |
| 01605D | 658745 | 23 |
| 01605D | 158965 | 1 |
| 01605D | 128544 | 45 |
| 01605D | 123659 | 7 |
| 01605D | 128588 | 9 |
| 01605D | 124588 | 2 |
| 07822E | 112455 | 2 |
| 07822E | 238574 | 22 |
| 07822E | 598749 | 5 |
| 07822E | 254875 | 4 |
| 07822E | 254152 | 11 |
| 07822E | 658745 | 23 |
| 07822E | 158965 | 1 |
| 07822E | 128544 | 45 |
| 07822E | 123659 | 7 |
| 07822E | 128588 | 9 |
| 07822E | 124588 | 2 |
And the result should look like this:
| PartNumber | Quantity |
| 112455 | 6 |
| 238574 | 66 |
| 598749 | 15 |
| 254875 | 12 |
| 254152 | 33 |
| 658745 | 69 |
| 158965 | 3 |
| 128544 | 135 |
| 123659 | 21 |
| 128588 | 27 |
| 124588 | 6 |
| 112455 | 6 |
| 238574 | 66 |
| 598749 | 15 |
| 254875 | 12 |
| 254152 | 33 |
| 658745 | 69 |
| 158965 | 3 |
| 128544 | 135 |
| 123659 | 21 |
| 128588 | 27 |
| 124588 | 6 |
I tried this but it seems that the total QTY is summed and multiplied by three:
Solved! Go to Solution.
oh okay @WLFRD , then try this:-
Column =
CALCULATE (
SUM ( 'ProductionPartAll'[Quantity] ),
FILTER (
'ProductionPartAll',
'ProductionPartAll'[PartNumber] = EARLIER ( 'ProductionPartAll'[PartNumber] )
)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @WLFRD ,
You can directly drag your partnumber and Quantity column then mark Quantity column summerization as Sum.
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thanks! But I would like to have a calculated column. I need this total column for another calculation.
oh okay @WLFRD , then try this:-
Column =
CALCULATE (
SUM ( 'ProductionPartAll'[Quantity] ),
FILTER (
'ProductionPartAll',
'ProductionPartAll'[PartNumber] = EARLIER ( 'ProductionPartAll'[PartNumber] )
)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Is it possible to make the calculation dynamic? I mean, based on how we filter the data, it has to calculate the sum per PartNumber.
what result are you getting? can you share?
I get this result from your measure
Proud to be a Super User!
Is it possible to make the calculation dynamic? I mean, based on how we filter the data, it has to calculate the sum per PartNumber.
This is my result in Power BI:
| PartNumber | Total_QTY_Per_PartNumber |
| 128544 | 405 |
| 658745 | 207 |
| 238574 | 198 |
| 254152 | 99 |
| 128588 | 81 |
| 123659 | 63 |
| 598749 | 45 |
| 254875 | 36 |
| 112455 | 18 |
| 124588 | 18 |
| 158965 | 9 |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 46 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |