Forum Discussion

ozsoyozan's avatar
ozsoyozan
New Member
5 years ago
Solved

Warehouse daily stock calculation

Hello there;

I need your help on something.
I want to calculate the daily stock amount by using the daily amount of incoming and outgoing products in logistics warehouses.
What kind of formula should I write?

the calculation is as follows...
.

 

thank you

have a nice day.

 

  • I can't read the columns in your dispatch and receding tables, so you will have to swap those out. 

    place the Date[Date] column in your visual, then ther measure

     

    =calculate(sum(receiving[in]) - sum(dispatch[out]),filter(all(Date),Date[date] <=max(Date[date])))

6 Replies

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    DAX is all about filtering. You need to filter the table so it keeps just the records you need. Something like

     

    =calculate(sum(table[in]) - sum(table[out]),filter(all(table),table[date] <=max(table[date])))

    • ozsoyozan's avatar
      ozsoyozan
      New Member

      Dear Matt.

      Thank you. but which table should I choose in "filter(all (table)"?
      I could not fully understand.

      • MattAllington's avatar
        MattAllington
        Icon for Community Champion rankCommunity Champion

        I can't answer that question - you haven't provided any information about your tables.