Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

How can I avoid looping over weeks?

Hello.

 

I need to calculate future inventory for next week ( C4:F4 in my example)

 

Inventory_next_week = (Inventory_actual + Scheduled_Production_Next_Week) - Demand_Next week

 

Do I need to loop over the weeks to calculate it?

 

BR,

SKS

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous - Is that how your source data is organized? If so you will likely need to unpivot your week columns.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello Greg_Deckler 

       

      My data are ogranized into 3 different tables:

      • v-yingjl's avatar
        v-yingjl
        Community Support

        Hi Anonymous ,

        Combined with picture1 and picture2, how could the dataset be look like in power bi? Because picrture1 looks like a combined table but picture2 shows 3 different table. So which table you want to get the expected result? Could you please consider sharing the data table constructure in power bi?

         

        Best Regards,

        Yingjie Li