Forum Discussion
Anonymous
6 years agoNot applicable
Previous week value
Hi All, I would like to create a measure value to get previous week value. I dont want to use today-7. Also the below data is for jan 2020 where the data is present in the weekly manner. T...
v-kelly-msft
6 years agoCommunity Support
Hi Anonymous ,
First, you need to unpivot all your columns: Go to edit queries>Transform>select all the columns(except the column total)>unpivot columns,then you will as below:
Then add an index column from 1:
Finally return to the data view and a calculated column using a dax expression as below:
Column = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Index]=EARLIER('Table'[Index])-1))
And you will see:
For the related .pbix file,pls click here.
Best Regards,
Kelly
Anonymous
6 years agoNot applicable
Hi v-kelly-msft ,
Thanks for your suggestion but by doing unpivot it might affect my other column present in dataset. So is there any way to do it by some other way around.
Thanks