Mathijs Hooisma Posted January 12, 2021 Share Posted January 12, 2021 Last calender year had 53 weeks according to the ISO standard. The problem is now that I have a graph were the user can slice the x-axis from year-month-week-day. On the webserver of our company Spotfire is splitting up ISO week 53 in two parts: the days which are in 2020 are in week 53 and the day in 2021 are in week 1. Next to this, the weeks in 2021 are now shifted by one week. Last week in the graph is now week 3while that should be week 2. And week 2 should be week 1. On my personal laptop I have different time settings (week starts on sunday) and then week 53 is split in a week 53 part in 2020 and a week 53 part in 2021. Week 1 and 2 of 2021 are corrict in this set up. My question is how we can solve this, preferably on both the web server and laptop settings. Something similar like the FiscalYearOffset property Link to comment Share on other sites More sharing options...
Benny Aaen Posted February 2, 2021 Share Posted February 2, 2021 I have the same problem. By using Regional format English (United States), it partly solved the problem, but a week 1 is created with the 3 ramining day from week 53. So the week number in 2021 becomes wrong according to ISO standard. Link to comment Share on other sites More sharing options...
Mathijs Hooisma Posted February 3, 2021 Author Share Posted February 3, 2021 Excactly, this is also my problem. Woudl be nice to have some standard fix for this issue. Every few years we have a week 53 but we know exactly when! Link to comment Share on other sites More sharing options...
Gaia Paolini Posted February 3, 2021 Share Posted February 3, 2021 If you have TERR available you could try this solution https://www.tibco.com/blog/2017/03/20/reusable-simple-easy-iso-week-calc... Link to comment Share on other sites More sharing options...
Danny Kersten Posted March 31, 2021 Share Posted March 31, 2021 Can tibco introduce a IsoBinByDateTime function Link to comment Share on other sites More sharing options...
Mathijs Hooisma Posted April 1, 2021 Author Share Posted April 1, 2021 Thanks for this intermidiate solution. I'll have a try. I do know that this is still not a final solution since our webserver does not support TERR yet... Link to comment Share on other sites More sharing options...
Danny Kersten Posted April 1, 2021 Share Posted April 1, 2021 Another quite ungly workaround - calculate a "plot date" to use for the graph (note, you don't need all intermediate fields in below calculation) 3. Select Data > Transform data... Added transformations Transformation name: Calculate new column Column name: Week Expression: Week([Date]) Transformation name: Calculate new column Column name: ISOweek Expression: Integer(IsoDate('ww',[Date])) Transformation name: Calculate new column Column name: WeekDiff Expression: case when [Week]=[iSO week] then 0 when ([iSO week]=1) and ([Week]=2) and (Day([Date]) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now