Need to see a value by week with current year next to previous year in a Table Card

Hi,

 

I am trying to rebuild Tableau Dashboards in DOMO and I am running into a lot of trouble dealing with dates.  Some of the issues I have been able to figure out, but this one has me stumped and none of the available related advice seems to work for me in the SQL Transform component:

 

Using 3 fields: 'date', 'line', and 'calls'

 

I need to see the sum of calls by week for a set of lines with the previous year as a column next to the current year in a table card. These values will then also be used to calculate difference and percent difference (I can handle those things once the columns are made but I added that here for context).

 

The header of the resulting table card would look like:

 

week number  |   calls this year  |   calls last year  |   difference   |  % difference

 

And then the user should be able to filter the card by line.

 

The problems I run into are that at some level of the transforms intended to get previous year as a field I can put next to current year, everything becomes invalid.

 

How do I do what I am trying to do in the SQL Transform component?

Tagged: