Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Answered

DateGrouping by Month returning different results

(0) ShareShare
ReportReport
Posted on by 22
Hi All,
 
I have the following code in my web template. Dategrouping is supposed to return month number(1 to 12) based on the cra3c_gcpayoutmonth column in the below case. Even though i have records for the current month i.e September, its returning 9 and sometimes 8. Not sure what is going wrong. We are nearing Go-Live and this issue is creating lot of tension. Need your help with the same.
 
{% for entity in contact_query.results.entities %}
{% fetchxml PurchaseSummaryQuerys %}
<fetch distinct="false" mapping="logical" aggregate="true" output-format="xml-platform" version="1.0">
<entity name="cra3c_purchasehistory">
<attribute name="cra3c_gcpayoutmonth" alias="year" groupby="true" dategrouping="year" />
<attribute name="cra3c_gcpayoutmonth" alias="month" groupby="true" dategrouping="month" />
<attribute name="cra3c_lbspurchased" alias="value" aggregate="sum" />
<order alias="year" />
<order alias="month" />
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="cra3c_customernumber" operator="eq" value="{{entity.cra3c_customernumber}}" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% endfor %}
 
Thanks in advance
Categories:
  • Israel_Ramakuri Profile Picture
    22 on at
    Re: DateGrouping by Month returning different results

    Hi Fubar,

    Thank you very much for the insight. Based on your comment i checked the column advanced properties in Dataverse table and found that it is set to User Local. Changed that to Time zone independent and it worked. 

     

    Thanks once again.

  • Verified answer
    Israel_Ramakuri Profile Picture
    22 on at
    Re: DateGrouping by Month returning different results

    Hi Fubar,

    Thank you very much for the insight. Based on your comment i checked the column advanced properties in Dataverse table and found that it is set to User Local. Changed that to Time zone independent and it worked. 

     

    Thanks once again.

  • Verified answer
    Fubar Profile Picture
    7,964 Super User 2025 Season 1 on at
    Re: DateGrouping by Month returning different results

    One possibility is different User Timezones for dates that are defined as User Local or that, it is using UTC and you are viewing the data with a non-utc timezone.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43