Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Zack7
Contributor
Contributor

NPrinting - If data not available on current date, generate reports which referring to max previous date

Hi everyone, i am a newbie here. I am trying to generate reports as per conditions below;

FYI i enabled cycle with 3 fields to cycle;
Code A
Code B
Date C --> set as max date for daily report generation

1) Code A + Code B + Date C, if available = report will be generated (no issue with this)
2) Code A + Code B + Date C, if not available = report to be generated with max(Date C)
     i.e. if Code + Code B + (Date C =30 Sep 21) is not available, it will generate report with max(Date C) i.e. 28 Sep 21.

**Currently, reports will be generated only if data is available for the combinations of the above mentioned 3 fields.
Kindly suggest how do i achieve this? Thanks in advance for your help.

Labels (2)
1 Reply
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Zack7 

Your solution will not work if you are going to use date filter set for daily report generation as this filter will always remove records where there is no date for the max day. There is no built in function in NPrinting to apply filter on value of the cycle based on another cycle field values.

I can see at the moment one solutions which isn't easy nor straight forward, but if applied properly will work:

For your requirement to work you would have to model it in your QlikView data model so for each combination of Dimensions Code A and Code B you would calculate daily in the script value of Max date and flag such records and then use that in the cycle. You could then use flag as filter and since there will be only one value for each combination it will automatically filter out correct records. I understand that this can be challenging as it all depends on your data model and how it is constructed.

Cheers

Lech

 

cheers Lech, 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 to the problem.