web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Date functions in Smartlist Builder

(0) ShareShare
ReportReport
Posted on by

I have created a Smartlist that gives me the sales per customer per Months. How can I get the sales in the same report for the same months but from the previous year?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Jeff LaPointe Profile Picture
    1,022 on at
    RE: Date functions in Smartlist Builder

    You could make a SQL view and base your SmartList on the view.

  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Date functions in Smartlist Builder

    To me, the best option is to create your view on the SQL management studio taking into consideration all the required data you want, then get the view published to Smart list builder as mentioned above by Mr. Jeff.

    Although, you can still use a various functions in Smart list builder to manipulate the data as requested. A list of functions (including Date functions) is illustrated in the knowledge base article below;

    List of the Functions that You can Use for Calculations in SmartList Builder, Excel Report Builder, Navigation List Builder, and Extender in Microsoft Dynamics GP

    In addition, you may refer to the article published by Dynamics GP Support and Services blog on the link below;

    Calculated Fields in Extender and the Builders

    Hope this helps out in your inquiry,

  • Suggested answer
    L Vail Profile Picture
    65,271 on at
    RE: Date functions in Smartlist Builder

    Hi,

    Like Jeff and Mahmoud suggested, a view is probably your best bet. Routinely, however, I have to create SmartLists I can send to other people, so I need to create it inside SLB. Below is an example of the SQL code that you could use in your calculated field to find the first day in July of the previous year:

    select DATEADD(m, 6, DATEADD(yy, DATEDIFF (yy, 0, DATEADD(yy, -1, GETDATE())), 0))

    Replace 'GETDATE' with your data field. Use your date field, parse the month out of it and then subtract one from the resulting 'month' number.

    Change the '6' as follows to get the different months.

    January = 0

    February = 1

    March = 2

    April = 3

    May = 4

    June = 5

    July = 6

    August = 7

    September = 8

    October = 9

    November = 10

    December = 11

    Kind regards,

    Leslie

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans