Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ltc
Partner - Creator
Partner - Creator

Grouping Dates by Month

What is the expression to group dates by month?

I have a data set with dates that I uploaded via a spreadsheet.  I created a bar chart with Qlik, but I need the individual dates to be grouped by month.  

For example, I need 12/01/2017 through 12/31/2017 showing as Dec 2017, 01/01/2018 through 01/31/2018 showing as Jan 2018, and so on.

I'm an expression newbie so please explain in very simple terms.

Thank you so much!

3 Replies
Tanalex
Creator II
Creator II

In your load script you could add another column:

DATE(<your date field>,'MMM-YYYY')    AS MMMYYYY

Then use that field as your dimension.  HTH

sasiparupudi1
Master III
Master III

You generally use a master calendar linked yo your fact on keydate.

Else

Use date# and date functions

Ex

Date (Date #(DateField,'MM/DD/YYYY'),'MMM YYYY') as Period

Hth

yujiyamane
Creator II
Creator II

Hi Lea,

There are few ways to do what you want.

The quick win is to add below dimension into your chart.

=Date([xxx Your Date Field Name xxx],'MMMMYYYY')


The best way is to add master calendar dimension in your data model.

https://community.qlik.com/thread/48693


Hopefully this helps you. Good luck!