Forum Discussion

alex9999's avatar
alex9999
Helper I
4 years ago

Inventory Tracker DAX

Hi, 

 

I am currently creating an inventory tracker which tracks items moving in or out of a unit. I have created the core functionality of the report. However, I have 300+ items that I need to make individual measures for. The measure so far looks like this:

 

Assuming the item has a base count of 1000:

 

Item = 1000 + CALCULATE(SUM('Inventory'[Quantity]), FILTER('Inventory', 'Inventory'[Material_In_True] = TRUE() && 'Inventory[Component] = "Item")) - CALCULATE(SUM('Inventory'[Quantity]), FILTER('Inventory', 'Inventory'[Material_In_True] = FALSE() && 'Inventory[Component] = "Item"))

 Essentially, I take the base value and plus and minus any entries of that component that is fed through a SharePoint list.

 

I am currently pulling my hair out creating a measure for every individual component. Furthermore, I will be calculating the weight of each component so I will be creating a measure for each individual items weight * quantity to get the total weight. I will be left with 600+ measures in this report.

 

Any help with a time saving solution will be appreciated.

8 Replies

  • alex9999 Hi!

    What do you think about calculating a dynamic measure through the ALLSELECTED function and using a filter on the Item in order to calculate the measure related to that ?

     

    BF

    • alex9999's avatar
      alex9999
      Helper I

      Hi BeaBF , 

       

      The solution suggested will not work as I will eventually need to display items in a table so I can view all metrics of each component.

       

      Can you suggest something else?

       

      Kind regards

      • BeaBF's avatar
        BeaBF
        Super User

        alex9999 can you paste some data and an example of the expected result for two items? so as to better understand the request and do some tests

         

        BF

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi alex9999 

    Has your problem been solved ? If it has been solved, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,
    Community Support Team _ Ailsa Tao