Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

SUM qty field, but decrement from sum when new variable added?

Need guidance!  I'm looking to sum a quantity column, but filter by 2 separate visuals.  The difficulty I am having is decrementing the quantity when an added variable is introduced.


I'm looking for the quantity sum in WIP using the ASLY & TEST fields as my current filters.  Below I can easily filter to get what quantity is in ASLY (qty 2 based on below), but when I add in a test date, the ASLY quantity doesn't decrement.  


I am unsure how to include a statement to decrement?  Thoughts?





Yes, thank you I did miss the SUM bracket.  The DAX measure does replace the current visual level filters, but does not resolve my original issue.


If I add a TEST date, how can I get this same card visual to reduce the quantity?

Hi @bsmcfaden ,


Are you adding TEST date as a slicer on the report?




If this helps, Appreciate a KUDOS!
Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



No slicers.  Here's a more complete picture.  As you can see, I'm trying to see where the units remaining to ship are in the process.  The DAX measure you provided does show the correct quantity in my WIP Assembly card, but when a TEST date is added to move the product to WIP Test, the WIP Assembly card does not decrement.



Hi @bsmcfaden :


Try the below dax expression:

var _countall=SUMX(FILTER(ALLSELECTED('Customer Orders'(3)),'Customer Orders'[ASLY]<>BLANK()),'Customer Orders'[Qty])
var _counttest==SUMX(FILTER(ALLSELECTED('Customer Orders'(3)),'Customer Orders'[ASLY]<>BLANK()&&'Customer Orders'[Test]<>BLANK()),'Customer Orders'[Qty])

If the above doesnt work,could you pls upload your .pbix file to onedrive business and share the link with us?


Best Regards,
Did I answer your question? Mark my post as a solution!

View solution in original post

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!


Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors