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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
mb0307
Responsive Resident
Responsive Resident

Substract based on criteria

Hi,

 

I have a Purchase Order (PO) data below:

SS1.jpg

 

If Movement Type is 102 then I want to find 101 value with same Batch and Quantity (in Confirmed Qty and Posting Qty columns).  Substract Qty in Confirmed and Posting Qty column.

 

So the result and sum should look like this:

 

SS2.jpg

 

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @mb0307 ,

 

Try this.

v-lionel-msft_0-1605252236704.png

 

Best regards,
Lionel Chen

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

7 REPLIES 7
v-lionel-msft
Community Support
Community Support

Hi @mb0307 ,

 

Try this.

v-lionel-msft_0-1605252236704.png

 

Best regards,
Lionel Chen

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

lbendlin
Super User
Super User

Why would that be? Are there any user interactions that could influence the computation?

mb0307
Responsive Resident
Responsive Resident

Not really - I am little more comfortable with DAX than M.  But any solution as long as I can get a solution please.  

lbendlin
Super User
Super User

Would you like the result in Power Query or in DAX?

mb0307
Responsive Resident
Responsive Resident

@lbendlin DAX please

lbendlin
Super User
Super User

please re-post. images are not showing.

mb0307
Responsive Resident
Responsive Resident

@lbendlin  please check now. 

Helpful resources

Announcements
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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors