chart date granularity for week not following any standard

  • 1
  • Problem
  • Updated 3 years ago
ERG!!! This is not following any standard for week numbers.



Here I was attempting to make everything work with the data grouped by week that starts on a Monday or Sunday. Nope. First day for the year this year, 2015, is Thursday. So the first day of week for every week is Thursday.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
  • frustrated

Posted 3 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Yep, it's weird, but it was intentional to be consistent with the way Salesforce calculates "Week in Year" in SOQL:

"1 for January 3
The first week is from January 1 through January 7."

Try running the following query, and I think you'll see what I mean:
SELECT CreatedDate FROM skuid__Page__c WHERE WEEK_IN_YEAR(CreatedDate) = 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Well. If someone jumps off a bridge ...

There should at least be a note on this in the Chart component when Week is chosen.
Photo of Josh Cutler

Josh Cutler, Official Rep

  • 864 Points 500 badge 2x thumb
You're right, Pat. This needs to noted, so I added it to the tutorial. I'm guessing you think it should be a tooltip on the Default Date Granularityso that you can find this information without wandering over to the documentation. I'll make that suggestion.