Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Days Cover Calculation Per Material

Hi There,

 

Can you please help me?

 

I'm trying to calculate the days stock coverage per Material for each week:

 

Please can you help me with suitable formulae to calculate as above?

 

The previous posts I have see only seem to work if there is only 1 Material in the table.

 

Best Regards

  • Anonymous ,

     

    You can create a table visual in power pivot and then drag the measure to the table visual.

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Anonymous ,

     

    Generally, you may create a calculate column using DAX below:

    Result =
    CALCULATE (
        SUM ( Table[Days_Cover] ),
        FILTER (
            Table,
            Table[MATNR] = EARLIER ( Table[MATNR] )
                && Table[Year_WeekNo] = EARLIER ( Table[Year_WeekNo] )
        )
    )
    

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable
      Many thanks for your reply...

      And what do I put for the Days_Cover calculation?
      • v-yuta-msft's avatar
        v-yuta-msft
        Community Support

        Anonymous ,

         

        You can create a table visual in power pivot and then drag the measure to the table visual.

         

        Community Support Team _ Jimmy Tao

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • PetrS's avatar
    PetrS
    Frequent Visitor

    Hi. I am sorry but dont understand the solution. I have the same problem I think. How to calculate days of cover . I have table contains fields: day,material,stock,demand. Tried many ways but wrong ways. Please could you be more "visual" for novice. Thank you a lot.