Forum Discussion

lherbert501's avatar
lherbert501
Post Prodigy
2 years ago

DAX Logic for Counting Quantity

Hi,

 

I have a specific requirement with some locations and items in my report and I need to get the dax correct, which I'm struggling with.

 

Its quite confusing but essentially :

 

  • If Location 3 Quantity is greater than 0, then Location 3 Quantity minus Location 1 Quantity, and make Location 2 for that item 0
  • If Location 3 doesn't exist for the item or 0 Quantity then take the Quantity from Location 2 as normal

I've included a dummy report with some more information on. If any more info is needed please let me know.

 

Dummy Data Location.pbix

 

Any help would be greatly appreciated

 

Thanks

1 Reply

  • Not really sure what you need to accomplish but here's how I would structure the data model