Date Formula Grouping

Posted on 2012-09-05
Last Modified: 2012-09-05
I have a report that displays reads by date and I wnat to create a group by year.


1/1/2012   945
2/2/2012   968
3/3/2012   980......etc.  report has dates for 2009-2012

Now I want to group by the year......if, then, else?  

Thank you.
Question by:washvt
    LVL 9

    Accepted Solution

    Try this:

    Year(Date) as Year,
    sum(data) as int
    from table1
    where Year(Date) between 2009 and 2012
    group by Year(Date)
    LVL 12

    Expert Comment

    As long as your date is formatted as a date, create a formula as

    year({}), add it to your report, and group by it.

    If your date is a string, then use year(date({})) instead.

    Author Closing Comment

    Thank you

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    This article shows how to convert a multi-page PDF file into multiple image files, with one image file created for each page of the PDF. It does this by utilizing an excellent, free software package called GraphicsMagick. The solution is amazingly s…
    In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
    Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
    The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now