Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Week number or Quarter number

Hi all,

I have a date from 2012 in my database. I have created a master calendar.

The week number and quarter is same for all the four years(2012,2013,2014,2015).

Example:  January month of all the 4 years belongs to Quarter Q1. I don't need like this i need as jan-2012 in Q1, jan-2013 in Q5, jan-2014 in Q9, jan -2015 in Q13.

Because i need to show data in quarter for all the 3 years in line graph.

or anyone explain how can i achieve this?

quarter.png

You can see in above image that the data is comparing for every four months i need to prepare a line graph like above.

Regards,

Pramod

14 Replies
MK_QSL
MVP
MVP

cant help you further until I will get the fact table which you are using in excel file...

Not applicable
Author

OK i will add excel, din't get what is fact table. i need to add all the tables what i have used?

MK_QSL
MVP
MVP

OK... Add All tables in excel and upload here..

swuehl
MVP
MVP

I think that's because the calendar table and the table with Month_Year are not linked properly.

Maybe all you need is adding a common key to the calendar:

  1. Calendar: 
  2. Load  
  3.   *, 
  4.   'Q'&AutoNumber(TempQuarter) as Quarter; 
  5. Load  
  6.   Date(TempDate) as Date
  7.   Month(TempDate) as Month
  8.   Year(TempDate)& Num(Ceil(Month(TempDate)/3),'00') as TempQuarter,
  9.   Date(Monthstart(TempDate),'MMM YYYY') as Month_Year, 
  10.   Year(TempDate) as Year 
  11. Resident Temp_Calendar 
  12. Order By TempDate; 
Not applicable
Author

please find the attached sample files.