Forum Discussion

alexcatala's avatar
alexcatala
Icon for Helper IV rankHelper IV
5 years ago
Solved

Create weekly units from daily units

Hi,

 

I am currently trying to create a measure to obtain the weekly units based on the daily units. 

In this Data the daily unit is the QTY. 

 

I have also the week in this database, so I would like to be able to calculate the weekly units based on the week and the store I select. Any suggestion?

 

Thanks in advance for your help

 

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi alexcatala ,

     

    You could use ALLEXCEPT() to calculate the sum of each group:

    Measure = CALCULATE(SUM('Table'[Qty]),ALLEXCEPT('Table','Table'[Store],'Table'[Week]))


    Please take a look at the difference outputs:

     

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

4 Replies