calendar week in graphs

Hello,

we are on UK locale - so week runs Monday to Sunday

Graph on Skuid page is grouping Friday to Thursday

Makes management reporting very hard

Help!

Ben

Hey Ben,

Could you post a screenshot? I think I might be able to help you, but I want to understand what kind of graph you’re using first…

Thanks,
Karl

Karl,

here you can see the column chart - this is based on a count of end dates for actions in the table below.
Week 42 (second column) has 9 actions,
In UK local (Monday to Sunday) week 42 is 17th to 23rd Oct, however as the second screen shot shows the 9 actions have end dates that range from 14th Oct to 20th Oct - that is to say over weeks 41 (10th to 16th) and week 42 (17th to 23rd)

Ben.
!(https://us.v-cdn.net/6032350/uploads/attachments/RackMultipart20161014-36577-g71pyr-Screen_Shot_2016-10-14_at_14.49.54 2 inline.png “Image https//d2r1vs3d9006apcloudfrontnet/s3_images/1497090/RackMultipart20161014-36577-g71pyr-Screen_Shot_2016-10-14_at_144954__2__inlinepng1476453074”) !(https://us.v-cdn.net/6032350/uploads/attachments/RackMultipart20161014-1886-e0it2l-Screen_Shot_2016-10-14_at_14.50.20 2 inline.png “Image https//d2r1vs3d9006apcloudfrontnet/s3_images/1497091/RackMultipart20161014-1886-e0it2l-Screen_Shot_2016-10-14_at_145020__2__inlinepng1476453079”)

Karl,

Do you have any more thoughts?

This is a material issue for us - so any help would be great

Cheers,

Ben

Karl,

Do you have any more thoughts?

This is a material issue for us - so any help would be great

Cheers,

Ben

Karl,

Still waiting for help on this. Is there someone else who can pick this up?

Cheers,

Ben.

Hello Ben

What jumps to my mind, when i see this is the chart might be set up with wrong Axis specifications.

On the default date granulatiry of the chart you can select Calendar Week which should group you the Records Monday to Sunday rather than Friday to Thursday
(Keep in mind the Default Date Granularity field is only available if the Category field is a Datefiled, not a Datetime field!)

Hello Ben

What jumps to my mind, when i see that problem is, the chart may have wrong configurations in the category Axis. I attached a screenshot of the category axis which is working in a CET timezone (Had no UK-Testsetting right away).

The Default Date Granularity and Additional Granularities only show up if the Category Field is a Date field (NO DATETIME!).

If you still have problems with it, you can paste me the XML of the Chart you are using and i can take a deeper look into it.

Matthais,

Thank you for picking this up. The field is a Date field. Here is the XML







day
calmonth




















































#81d4fa
#4dd0e1
#26a69a
#03a9f4
#00acc1
#00796b
#0277bd
#80deea
#4db6ac
#29b6f6
#00bcd4
#00897b
#0288d1
#00838f

                                        <renderconditions logictype="and"></renderconditions>
                                    </skuidvis__chart>  

Here is the category field:

Cheers,

Ben

Hey Ben

I found out why this happens, the Week you are looking at is NOT what you would generally expect. It’s based on ISO 8601 for time measurement. So for this year week 1 actually starts at a thursday.

So i think the best way to tackle this problem would be a UI-Only field which gives a “offset” to the weeknumber. I’ll reply again when i found a fitting formula.

Hey Ben

I finally found a solution which may help you get out of that misery:
When you create a UI-only Field with the following syntax

FLOOR((IF(MONTH({{amc__End_Date__c}})&gt;=1, 31,0)+IF(MONTH({{amc__End_Date__c}})&gt;=2, 28,0)+IF(MONTH({{amc__End_Date__c}})&gt;=3, 31,0)+IF(MONTH({{amc__End_Date__c}})&gt;=4, 30,0)+IF(MONTH({{amc__End_Date__c}})&gt;=5, 31,0)+IF(MONTH({{amc__End_Date__c}})&gt;=6, 30,0)+IF(MONTH({{amc__End_Date__c}})&gt;=7, 31,0)+IF(MONTH({{amc__End_Date__c}})&gt;=8, 31,0)+IF(MONTH({{amc__End_Date__c}})&gt;=9, 30,0)+IF(MONTH({{amc__End_Date__c}})&gt;=10, 31,0)+IF(MONTH({{amc__End_Date__c}})&gt;=11, 30,0)+IF(MONTH({{amc__End_Date__c}})==12, 31,0)+DAY({{amc__End_Date__c}})+IF((CEIL(YEAR({{amc__End_Date__c}})/400)==YEAR({{amc__End_Date__c}})/400),1,IF((CEIL(YEAR({{amc__End_Date__c}})/100)==YEAR({{amc__End_Date__c}})/100),0,IF((CEIL(YEAR({{amc__End_Date__c}})/4)==YEAR({{amc__End_Date__c}})/4),1,0))))/7)<br />



And base your graph off this UI-only field rather than the actual date field, it should fix your problem

What it does is, it calculates the “number of week” in the way you and i are used to

Matthais,

thank you for the solution - I really apprceaite your taking the time to solve it!

Is that a Skuid thing or a Salesforce thing? The ISO thing doesn’t seem particularly useful for any of us that live in the real world!

Ben

It is a Technical standard, it makes sense to keep it since certain devices will get confused with different standards (Not necessarily in SF context but when regarding Week of year in general), but from a human perspective it doesn’t seem intuitive.

So this is most likely while SF has adopted this standard. But at this point i can only guess about sense and nonsense. if you want more information why this is built that way, i’d recommend asking the salesforce support.