Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Inventory Tracking based on limits per customer

We provide the homeless community a snack and soda voucher that works at all 5 shelters in the city.
Each voucher is good for a total of 5 free sodas and 10 free Hot Dogs between July1 and June 30.
We capture this data in a database but need a daily report to print for each site so the workers can mark each person daily, no matter which shelter they go to.

 

I need help writing the dax that shows how many of each product a person has been given and how many remain. I do not care where they used the voucher, I just need a running total so that our other team has time to apply for a new voucher if necessary.

The final report lay out should look like this:

 

Customer Name | Allowed HD | Provided HD | Remaining HD | Allowed Soda | Provided Soda | Remaining Soda
Amy                           10                  6                      4                          5                         1                     4
Jane                           10                  2                      8                          5                          5                    0
Willie                         10                  9                      1                          5                          4                     1

 

Thanks in advance

Table Name = FoodGrant

Fields = Customer Name, Products (soda, hot dog, chips), Shelter (L1,L2,L3,L4,L5), Voucher Date

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

    How to Get Your Question Answered Quickly  

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      No, like a million other people who ask for help on this site, am unable to provide sample data. I gave a few  examples and all the potential columns within the table. If you can't help with what's provided just scroll past my question.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Resolved