Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
QS21
Contributor
Contributor

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
Specialist

Hi @QS21 ,

Did you have a date field in the dataset?

Regards,
Abhijit
keep Qliking...
QS21
Contributor
Contributor
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
Specialist

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...
QS21
Contributor
Contributor
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
Specialist

Hi @QS21 ,

 

Please find attached QVF.

Let me know if any doubt. 

Regards,
Abhijit
keep Qliking...
QS21
Contributor
Contributor
Author

Hi @ Abhijitnalekar,

 

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

 

Thank you..

abhijitnalekar
Specialist
Specialist

are you getting any error while opening the file?

Regards,
Abhijit
keep Qliking...