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

problem with dynamic date logic

Hi All,

There was a requirement to automate some excel report using Qliksense.. Here , I read the data from excel files directly to qliksense.

In one of my logics   I use:  [MthYr] is my date variable

=IF(MthYr >= date(AddMonths(today(),-2),'YYYYMM')and MthYr <= date(AddMonths(today(),-1),'YYYYMM') , MthYr)

Example: today is 25-Sep-2021 , My report shows Aug data (All good)

Today is 2-Oct-2021, my logic gets refreshed and dtaa becomes zero .

I want to showcase only the last month data in my app. My data gets loaded everymonth between 11 to 15th..

Please help me modify the above logic so that it will not get refreshed automatically after 1st of everymonth..

7 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @QS21 ,

Did you have a date field in the dataset?

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
QS21
Contributor III
Contributor III
Author

Yes, the data format is this way in the iput file:

Desc  Jan21  Feb21 ....... Dec21

ABC    1200     2100..........3250

The source team fills the data in new month cells every month...

In Qliksense, I do cross table and transpose the source file:

Desc  Date   Balance

ABC Jan21  1200

 

All I need is how can I display data form the latest month cells (that has values)

When I use max function it is picking obviously Dec21.. But dec will not have value unless it is Jan22

Is there any other way to pick the data from the month..?

 

 

 

abhijitnalekar
Specialist II
Specialist II

Hi @QS21 ,

 

Why do we have value for Dec21. As per my understanding, you will get the data of Dec21 in Jan22.

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
QS21
Contributor III
Contributor III
Author

This is how the data looks like.. is there any pther way to pick the latest month (curr - 1) wihtout using "today"?

The above logic that I am using works absolutely fine. But after 1st of next month data goes blank untill new data is loaded..

Desc1-Jan-211-Feb-211-Mar-211-Apr-211-May-211-Jun-211-Jul-211-Aug-211-Sep-211-Oct-211-Nov-211-Dec-21
ABC2433524312324214245435324214332421434213234213345324   
DEF45766523134564654672343255454435345433245435432   
abhijitnalekar
Specialist II
Specialist II

Hi @QS21 ,

 

Please find attached QVF.

Let me know if any doubt. 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
QS21
Contributor III
Contributor III
Author

Hi @ Abhijitnalekar,

 

Apologies, but I am unable to view the file that you sent..

 

Thank you..

abhijitnalekar
Specialist II
Specialist II

are you getting any error while opening the file?

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!