Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous date Set Analysis???

Hi,

I have one fact table with Date field (FECDATA) and created all the charts using this field in all the measures. but the fact tabel doesn't contain  all the dates for the year... i have created one calender table and linked with this fact table. The key field is FECDATA for these two tables.

  i have used the following as one of the set modifier to find the previous date before adding the calender Table and its working fine.

FECDATA={"$(=date(max(FECDATA)-1,'DD/MM/YYYY'))"}

This works fine for the list boxes created for Year,   Month and Date as  (Year(FECDATA), Month(FECDATA) AND Day(FECDATA))

But when i replace these list boxes with Year, Month and Day of the Calender Table, its not working to find the previous date, when i select for a particular date using Year, Month and Date list boxes.

How to make this work to find the previous date?

Your help is greatly appreciated...

Regards

Siva

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

You need to override these selections like this:

   <FECDATA={"$(=date(max(FECDATA)-1,'DD/MM/YYYY'))"}, Year, Month, Day>

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You need to override these selections like this:

   <FECDATA={"$(=date(max(FECDATA)-1,'DD/MM/YYYY'))"}, Year, Month, Day>

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

thanks a lot for quick response..

Actually, i wanted to calculate the measument based on the selected date....

I mean, i want to get result for the previous date of the selected date, But not always the previous day of the maximum.

Hope this clears to understand the requirement.

i have list boxes for the fields from Calender Table... but i wanted to calculate the value based on FECDATA from FACT Table....

Am i doing it correct way?

Regards

Siva

jonathandienst
Partner - Champion III
Partner - Champion III

Well if you have one data selected, then that is the maximum.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks a lot Jonathan for your kind reply..

I was out of station for few days and couldn't be replied to you immediately. Please accept my sincere apologies...

I haven't tested with my data yet.. it seems it's going to work with out any doubt.

How can i mark this as "Correct Answer"? As i can't see this option when i check this post in Inbox. Am i looking in the write page to make it as correct Answer... I can only see drop down buttion called Actions and having one option as Helpful Option.

Regards

Siva


Not applicable
Author

Thanks a lot Jonathan for your help.

its working correctly now... the only change i menstioned '=' sign after year, month and Day..

  <FECDATA={"$(=date(max(FECDATA)-1,'DD/MM/YYYY'))"}, Year=, Month=, Day=>

Regards

Siva