Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Selected Week from Next 4 week value calculation

I have table name called Invenoty sheet . this table look like . i want filter it only Demand Attribute value . if Demand attribute value if date 15 March  2021 select from that date to Next week  va...
  • v-yadongf-msft's avatar
    4 years ago

    Hi Anonymous ,

     

    1.Please create a new table like below using following DAX:

    Table = FILTER('Append1','Append1'[ATTRIBUTE]="Demand")

     

    2.Create a measure called Selected week from Next 4 week:

    Selected week from Next 4 week = SUMX(
        DATESINPERIOD('Table'[DATE],MIN('Table'[DATE]),28,DAY),
        CALCULATE(SUM('Table'[VALUE]))
    )

     

    3.In report page, please create a table visual, then you can see the total data for the last four weeks.

    210 = 45+55+65+45

    260 = 55+65+45+95

    250 = 65+45+95+45

    ……

    Best Regards,

    Yadong Fang

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