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

Line graph Dates

Hello,

I want my line graph to first appear in years and after I click on an specific year to expand to the months (of that year) and the same for when I clik in Months to days.

I have sales per day data, 

I have been reading and what I can infer is by creating a master calendar or a master element. Can you all agree with this and if yes then how to do it? If there is any other solution then thanks in advance

I have attached a Word Doc, with an example

Labels (1)
1 Solution

Accepted Solutions
Qlik1_User1
Specialist
Specialist

Create a drill down dimension to achieve this..

Like Year -->Month-->Day.

Kindly close this thread if above helps.

View solution in original post

2 Replies
Qlik1_User1
Specialist
Specialist

Create a drill down dimension to achieve this..

Like Year -->Month-->Day.

Kindly close this thread if above helps.

Ezir
Creator II
Creator II

Hello @Carlos2 ,

You can try this:

//sample data 
SET DateFormat='YYYY/MM/DD';

Order:
Load * inline [
OrderDate; OrderNo; 
2018/01/01;1
2018/01/10;2
2018/02/01;3
2018/05/01;4
2018/06/01;5
2019/01/01;6
2019/02/01;7
2019/03/01;8
2019/05/01;10
2019/06/01;11
2019/06/10;12
2019/07/01;13
2019/08/01;14
2019/08/10;15
2020/01/01;16
] (delimiter is ';');

//calendar
Calendar: 
  DECLARE FIELD DEFINITION Tagged ('$date')
FIELDS
  Dual(Year($1), YearStart($1)) AS [Year] Tagged ('$axis', '$year'),  
  Month($1) AS [Month] Tagged ('$month', '$cyclic'),
  Date(Floor($1)) AS [Date] Tagged ('$axis', '$date', '$qualified'),
  Date(Floor($1), 'D') AS [_Date] Tagged ('$axis', '$date', '$hidden', '$simplified');  

DERIVE FIELDS FROM FIELDS OrderDate USING Calendar;

 

Thereafter you can use the OrderDate.Calendar.Year field or create a hierarchical dimension (OrderDate.Calendar.Year-> OrderDate.Calendar.Month-> OrderDate.Calendar.Date)

Regards,

Ezir