Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nboccassini
Partner - Creator
Partner - Creator

DATA MODEL: How model data to analyze Quarter and Half Year from dates

Hi all,

I've a data like this (dates are in dd/mm/yyyy format) :

TYPEPERIODINPUT
ID1H120182
ID1H220183
ID204/02/20181
ID1Q220181
ID1Y20185
.........

 

I need a pivot to analyze different custom expression on Months, Quarters, Half and Year 

Data on Q,H and Y periods are cumulative, but the problem is the ID2 row when I want to analyze data on Q (for example). In a Count  expression, ID2 data must be counted if I want to see Months,Quarter etc.

How model data to analyze informations ?

Do you have suggestions?

Labels (2)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

the main problem here is that the field PERIOD contains different formats of dates, years, quarters, etc... I'd recommend creating a Master Calendar table, which would associate the field PERIOD with a consistent set of date fields:

- The Date (the starting date of the period)

- Year

- Quarter

- Month

Once this table exists in the data model, and all PERIODs are properly described in the calendar table, then you can create analytics based on the Year, Quarter, and Month fields from the Calendar

Cheers,

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

the main problem here is that the field PERIOD contains different formats of dates, years, quarters, etc... I'd recommend creating a Master Calendar table, which would associate the field PERIOD with a consistent set of date fields:

- The Date (the starting date of the period)

- Year

- Quarter

- Month

Once this table exists in the data model, and all PERIODs are properly described in the calendar table, then you can create analytics based on the Year, Quarter, and Month fields from the Calendar

Cheers,

Brett_Bleess
Former Employee
Former Employee

Couple of Design Blog posts in relation to Oleg's post that may be of further assistance:

https://community.qlik.com/t5/Qlik-Design-Blog/The-Master-Calendar/ba-p/1471527

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

Do not forget to close out your thread by using the Accept as Solution button if a post gets you the information you need, and if you do something different, you can post what you did and then use the button to mark that as the solution to let other Members know what you did.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.