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

Two master calendar which must affect on clicking any one

I have two master calendars extracted from two different fields, say

Screenshot_98.png                    Screenshot_99.png

Screenshot_96.png

Say Day, Month, Year are derived from JobcreateDate and Day_j, Month_j, Year_j are derived from crewstatusdate.

If i select on Day field it must affect the Day_j field and also Month and Year field similarly.

Screenshot_97.png

Similarly Vice versa If i select Day_j it must affect the day field

If i select on  Job create date the date or month or year selected must affect the crewstatusdate also.....

Can anybody help in this!

Regards,

Yoganantha Prakash G P

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Let's consider from your example

Fact:

Load JobcreateDate as DateField, 'JCD' as Flag ..... From Table1;

Concatenate

Load crewstatusdate as DateField, 'CSD' as Flag ......From Table2;


After reload this script, It create it as one Directory dimensional Table which called Fact in Data model. And, Finally I would ask you to create master calendar from that Fact like below

CalendarMaster:

LOAD

    Date(DateField) AS DateField,

    Year(DateField) AS Year,

    'Q' & Ceil(Month(DateField) / 3) AS Quarter,   

    Month(DateField) As Month,

    Day(DateField) As Day,

    Week(DateField) As Week;

Load Date(MinDate + IterNo() -1 ) AS DateField While (MinDate + IterNo() - 1) <= Num(MaxDate);

Load

    Min(DateField) AS MinDate,

    Max(DateField) AS MaxDate

Resident Fact;

Then, You can start Filters as Flag and DateField and Month and Year and Day. Then start selection from flag like JCD and check whether how is data associative with each together

HTH

Anil

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

5 Replies
Anil_Babu_Samineni

Why you want to create 2 master calendars here instead one. Will you create one master calendar from two different dates?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
yoganantha321
Creator II
Creator II
Author

Can you give any example

yoganantha321
Creator II
Creator II
Author

How can we achieve it

Anil_Babu_Samineni

Let's consider from your example

Fact:

Load JobcreateDate as DateField, 'JCD' as Flag ..... From Table1;

Concatenate

Load crewstatusdate as DateField, 'CSD' as Flag ......From Table2;


After reload this script, It create it as one Directory dimensional Table which called Fact in Data model. And, Finally I would ask you to create master calendar from that Fact like below

CalendarMaster:

LOAD

    Date(DateField) AS DateField,

    Year(DateField) AS Year,

    'Q' & Ceil(Month(DateField) / 3) AS Quarter,   

    Month(DateField) As Month,

    Day(DateField) As Day,

    Week(DateField) As Week;

Load Date(MinDate + IterNo() -1 ) AS DateField While (MinDate + IterNo() - 1) <= Num(MaxDate);

Load

    Min(DateField) AS MinDate,

    Max(DateField) AS MaxDate

Resident Fact;

Then, You can start Filters as Flag and DateField and Month and Year and Day. Then start selection from flag like JCD and check whether how is data associative with each together

HTH

Anil

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think your example is mostly good but is missing linking fields back to Table1 & Table2.  Here's another example of using multiple dates with a single calendar.

Qlikview Cookbook: Tutorial - Using Common Date Dimensions http://qlikviewcookbook.com/recipes/download-info/tutorial-using-common-date-dimensions/

-Rob

http://masterssummit.com

http://qlikviewcookbook.com