14 Replies Latest reply on Sep 2, 2018 8:25 PM by Shinichiro Murakami

# Week over week grid

HI All,

I have a week over week grid view, where the date field is ascending from jan 2018 to June 2018, distributed weekly order.
This WoW is showing the difference % for four previous week's average being compared with the 5th week, and so on.

Question goes here ->
Can this week over week be sort on date descending, showing the current week as first column in grid,
but comparing its own four previous week data to calculate the Difference %?

Regards,

• ###### 1. Re: Week over week grid

Thanks,

Shin

• ###### 2. Re: Week over week grid

Hi Shin,

Here I have attached a week over week sales comparision using the Sample -Super stores dataset.

Regards,

• ###### 3. Re: Week over week grid

HI Kumar

Could you tell me how you want to calculate in this case?

Need absolute example.

I have the answer in case

- Including null date value to get previous (and) descending date order

or

- excluding null date value to get previous (= previous week is different by Region)  (and) ascending order date only (using "previous_value")

no solution

- excluding null date value to get previous (= previous week is different by Region)  (and) descending date order

Thanks,

Shin

• ###### 4. Re: Week over week grid

Hi Shin,

- Including null date value to get previous (and) descending date order

the above case will be good to go with, when null values occur.

Regards,

• ###### 5. Re: Week over week grid

Hope this helps if that's the case.

Thanks,

Shin

• ###### 6. Re: Week over week grid

Thank you Shin!

That really helped me to achieve the requirement ..

1)Is there chances to compute the diff % for average of four weeks prior to current date..
I have tried it.Pls correct me if I am wrong.

2) When sorted the date in descending order, the last four date columns are left empty without diff % computed( as taking four week avg from prev four week)

Regards,

• ###### 7. Re: Week over week grid

I have not verified in detail, but just providing theoretical formula.

Thanks,

Shin

1 of 1 people found this helpful
• ###### 8. Re: Week over week grid

Hi Shin,
May i know how the same functionality could be done when the date is sorted in ascending order?

Regards,

• ###### 9. Re: Week over week grid

Hello Shin,

This Window_avg(Sum([Sales]),1,4) works good for the date sorted in descending order, to compute previous 4 week average diff.

May I know date sorted in ascending order?

Regards,

• ###### 10. Re: Week over week grid

The concept is OK but if you want to average last 4 EXCLUDING current, you should set range as Window_avg(sum([sales]),-4,-1)

Thanks,

Shin

1 of 1 people found this helpful
• ###### 11. Re: Week over week grid

Hi Shin,
With your assistance I was able to perform the week over week analysis successfully,

1.it is a live connection from Teradata table(as datasource)

I published the dashboard as below,

The problem statement goes here->

This live connection dashboard doesn't refresh to get the current week data, once the data is updated in Datasource(teradata),
we need to give a manual refresh on the Tableau dashboard to get the current week data.

Is this due to the option -> "Include external files" check box in the Publish window?

P.S: I have an image in the dashboard, so as I have checked the "Include external files"

Regards,

• ###### 12. Re: Week over week grid

Difficult to suggest server related topic with the lack of environment.

See attached as reference of general data publish flow (Not official, my understanding).

Thanks,

Shin

• ###### 13. Re: Week over week grid

Hi Shin,
Could you please suggest me on 'how different measures can be put under week over week'

with this formula being used Window_avg(sum([sales]),-4,-1and the date being sorted in descending order.

Here, measure is Sales. but i want a model that will work for Sales i n a row,
Profit in row,
Discount in a row....and so on..all in a single table.

P:S:for demo you can use the sample super stores data also.

• ###### 14. Re: Week over week grid

You need to create the number of measure value field.

If you can use "pivot", it's different story,

You only need to create number of measure values which has "different number format".