Skip to main content

Hello,

 

I'm trying to create a week over week variance based on one date column, say "A" (7/3/2017 14:25:12). On the basis of that date column, i have certain measures (B,C,D) that change its values based on column A. Every time i refresh my SQL query, col A (7/7/2017 14:25:00) changes and so does values for B,C and D. The data set doesn't retain the old values for those columns. I want to calculate the variance for B,C and D based on col A, before and after my data refreshes.

Can anyone help me with a calculation that can help me get the variance based on the above condition?

1 answer
  1. Jul 7, 2017, 7:53 PM

    If the previous week's data is not stored somewhere when you refresh the extract, this will not be possible.

     

    If it is stored in the database, you can have the extract pull the current and previous week's data, then calculate the difference in measure values between the rows associated with the current and previous weeks using table calculations, or push these calculations into your SQL query.

0/9000