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: 
smilingjohn
Specialist
Specialist

wiered Date behaviour

Hi All, 

I have to show a table in which I will have a field monthyer converted from the Master Calendar. 

I am using the date bridge in which i am taking two residents of the same table to get "Created Date " and "Updated Date"

and then making this field get connected to the master calendar. 

But i am not getting the putput properly . If you can please look into my QVW file i have selected the monthyear NOV 2020

and the output should show me only those ID's which is common for NOV monht , but here it shows all . How can i handle this ? 

Thanks in Advance 

1 Solution

Accepted Solutions
edwin
Master II
Master II

the bridge is intended to link the fact and the calendar.  the month and year should be in your calendar.  i showed you just the bridge.  notice that in the chart, only Nov Create dates are associated with Nov month when the date type is Create and only Nov Update dates are associated with Nov when date type is update

when Nov is selected, In your expression you need to include the set analysis modifier {<DateType={'CREATE'}>} to pick up create dates in Nov and {<DateType={'UPDATE'}>} for  nov update dates.

so if you want to see all IDs created in Nov, select Nov, create a straight table with ID as dimension and expression

=count({<DateType={'CREATE'}>}ID)

for IDs updated in Nov

=count({<DateType={'UPDATE'}>}ID) 

if you want to see only IDs created and updated in the selected month:

count({<DateType={'UPDATE'}> * <DateType={'CREATE'}> }ID)

 

 

 

View solution in original post

3 Replies
edwin
Master II
Master II

look at the code to build the bridge.  add a key between bridge and your fact using concatenation of the dates (you can autonumber this later when youve proven your code)

dont mind the binary load and the drop statement - this is just to get to your original tables.

smilingjohn
Specialist
Specialist
Author

@edwin  I am really confused with the code you sent me ? how is this going to work ? 

Like should i follow the same steps after the master calendar ? Can u please provide some more information on this ?

Thanks

edwin
Master II
Master II

the bridge is intended to link the fact and the calendar.  the month and year should be in your calendar.  i showed you just the bridge.  notice that in the chart, only Nov Create dates are associated with Nov month when the date type is Create and only Nov Update dates are associated with Nov when date type is update

when Nov is selected, In your expression you need to include the set analysis modifier {<DateType={'CREATE'}>} to pick up create dates in Nov and {<DateType={'UPDATE'}>} for  nov update dates.

so if you want to see all IDs created in Nov, select Nov, create a straight table with ID as dimension and expression

=count({<DateType={'CREATE'}>}ID)

for IDs updated in Nov

=count({<DateType={'UPDATE'}>}ID) 

if you want to see only IDs created and updated in the selected month:

count({<DateType={'UPDATE'}> * <DateType={'CREATE'}> }ID)