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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
WLFRD
Helper III
Helper III

Dynamic count of Sum of part numbers

Hello,

 

I'm struggling with this issue of summing the quantity of part numbers and the 'dynamic calculation' of that quantity when filters are used.

I have this S124 table:

 

OperatorPart NumbersQtyUser
35520S016438409020AA
54459S016164100261BB
54459S016164100261BB
54459S016164100260AA
54459S016164100261CC
42834S013364700021CC
58000S018914400021CC
58000S018914400031CC
61200S017745300040AA
25812S711098500532DD
25812S711098501121DD
35462S017804200031DD
38420S013376200040DD
75548S017949500110DD
54122S019467600090AA
25812S711098500530BB
25812S711098501120BB
35808S016300700311CC
35808S016554000024CC
38420S017992301151AA
38420S017992301401BB
42352S016805000103AA
54122S019467600090DD
61200S009658009890DD
61200S013164500655CC
35808S016554000025AA
38420S017992301351AA
42660S017992300091DD
43860S017718300020AA
43860S017718300030BB
44068S009373609100BB
44068S009397209620BB
54122S016342100290BB
55011S019344300020BB
58001S019605500060AA
75180S017644301001AA
75540S016727900311DD
35462S017804200030DD
35680S017312630441CC
35694S018525400381DD
35694S018525400381CC

 

Capture2.JPG

I have tried the Group By in Power Query Editor and it summs the quantity of the parts. Only thing is, the rest of the colomns disappear when closing the Power Query Editor.

 

Next thing I tried:

 

Capture3.JPG

 

This column summs the quantity but isn't recalculated when, for instance, an operator is filtered out. 

 

What do I need to do to achieve that? 

 

Thanks in advance.

 

Regards.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @WLFRD ,

 

Try below formula:

count_ = CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'[User]))

vhenrykmstf_0-1669023220337.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @WLFRD ,

 

Try below formula:

count_ = CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'[User]))

vhenrykmstf_0-1669023220337.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

vanessafvg
Super User
Super User

can you provide your expected result?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




For instance, if User AA is selected, it should count 11 parts.

 

Capture5.JPG

Same goes for any other option you choose for User and/or operator. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.