Please find the below Approach and let me know whether it works for you or not. As Shawn sir, that is the only approach we need to follow
DATEADD(‘day’,6, DATETRUNC(‘week’,[Order Date],’Monday’ ) )
Also, Could you please check whether "Show" missing values is checked or not. if not then please checked it as below.
Thanks for sending this over. I didn't solve my problem though. For your formula to work i'd need to change my "week" pill to "continuos" instead of discrete (the way i have it now) and when that happens i can't compare year over year like to screenshot below.
This is what happens:
I want to keep year over year (2016 vs 2015) but change the week alias to 2016 dates (i.e. Week of Jan 4, Week of Jan 11, etc) When I'm using a "string" dimension i can easily change the alias but that doesn't seen to be the case date.
Thanks for your input anyway.
1 of 1 people found this helpful
Eduardo, the problem is that the 'Week 5' start date of week for 2015 is different from the same week start date in 2016. You want the label to be 'date specific' on your X-axis, across years, but to make your viz work it needs to be date unspecific. Tableau can make Week 5 in 2015 equivalent to Week 5 in 2016. But you are asking Tableau to make the date of the first day of the week of 2015 equal to the date of the first day of week of 2016, AND accommodate the variance between the two (as well as make allowance for leap years). All this because you don't like the Week X label on the axis?
Personally I think you are better off accepting the Week X label and then putting the actual start date of each week for each year in the tooltip. But that's just me.
PS: I suspect this post might prompt Calculation Jedi's to take this on as a challenge, because hey, that's what we do on the forums -- solve puzzles!
Shawn, I'm 100% with you. That's why my original question was about creating an "alias" sort of solution. I'll explain the situation to my stakeholders and hopefully they'll agree with the tooltip solution.
I'm not sure this brings another problem or not, but here is something....
According to the definition of workweek, you can do this.
I put definition as below.
[workweek] // 1/1 ~ 1/7 = workweek 1 in every year
Create date header
[Date Header] // This is newest date and not sorted apporpriately.
[Date Header 2] // I needed to use specific year's date to align.
makedate(2016,month([Date Header]),day([Date Header]))
How to handle workweek "53" is different story.
Date_header.twbx 29.8 KB
Thanks Shin. This is the kind of solution that I had in mind when I first posted to question but Shawn Wallwork made a very good point above. I think just for better label I'd be sacrificing too much.
Once again, thanks for your ninja input.
Thank you for your comment, but can I ask you what do you mean by "Ninja Input"?
I'm just curious
sure thing. Strait from google - ninja definition: "a person who excels in a particular skill or activity"