Hi,
So I have been pulling my hair over this issue.
I have a Date Parameter Calculation that allows users to compare period. The issue I am facing is that I need to introduce the % Difference between the two periods.
While I do have a workaround in place it is not ideal.
I've attached sample of how my data is structured, using the superstore data. It will be the last sheet.
My issue is that while the superstore data only has 4 regions, I have 30+ regions I need to compare so scrolling is necessary, so it makes it difficult displaying the % difference for each region.
Ideally I would like to find a way to display it all in a single sheet, the period comparisons and the % difference.
Period Calculation
IF
DATETRUNC([Period Length],[Book Date])=
DATETRUNC([Period Length],DATEADD([Period Length],-
IIF([Period Comparison]=1,1,
IIF([Period Comparison]=2 AND [Period Length]="day",365,
IIF([Period Comparison]=2 AND [Period Length]="week",52,
IIF([Period Comparison]=2 AND [Period Length]="month",12,
IIF([Period Comparison]=2 AND [Period Length]="quarter",4,
IIF([Period Comparison]=2 AND [Period Length]="year",1,0)))))),[Period End Day]))
AND
DATETRUNC('day',[Book Date])<=
DATETRUNC('day',DATEADD([Period Length],-
IIF([Period Comparison]=1,1,
IIF([Period Comparison]=2 AND [Period Length]="day",365,
IIF([Period Comparison]=2 AND [Period Length]="week",52,
IIF([Period Comparison]=2 AND [Period Length]="month",12,
IIF([Period Comparison]=2 AND [Period Length]="quarter",4,
IIF([Period Comparison]=2 AND [Period Length]="year",1,0)))))),[Period End Day]))
THEN
"Period Comparison"
ELSEIF
(DATETRUNC([Period Length], [Book Date]) =
DATETRUNC([Period Length], [Period End Day])
AND
DATETRUNC('day', [Book Date]) <=
DATETRUNC('day', [Period End Day]))
THEN
"Current Period"
END
There is also a Period End, Period Comparison and Period Length Parameter.
Basically for my workaround I am hijacking the Grand Total column in a seperate worksheet and allowing the user to click on the region to show the % Difference.
Shin,
I am having trouble grasping the concepts presented here.
I am familiar with some of these methods, but relatively new to Tableau. (Company transition to it 3 Months ago)
I don't believe the above method will work with how my data needs to be structured.
I've attached a screenshot of what the Dashboard the end user views looks like.
The issue with how I currently am doing it is it does not all ow the end user to sort by what regions declined/grew the most percentage wise period over period.
Sorry if I seem to be missing something incredibly obvious.
Regards,
Jalal Hassan