Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Vittore8
Creator
Creator

NPrinting 19 get last 7 days

Hi, I choose advanced search and write this,  =CB_DATE >= Max(Num(CB_DATE))-7 why doesn't it work?


17 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

Ok, I can see you can have the option of Advanced Search with your version.

miguelbraga_0-1599644806331.png

And I've searched in the help page and can see that option available:

https://help.qlik.com/en-US/nprinting/November2019/Content/NPrinting/ReportsDevelopment/Static-dynam...

What is the field you're using? Can you please share a screenshot?

miguelbraga
Partner - Specialist III
Partner - Specialist III

Create the variable inside the Qlik Sense app not in the NPrinting Web Console.

Vittore8
Creator
Creator
Author

I can't take a screenshot, this filter works well 
=CB_DATE => Date#('08.08.2020', 'MM.DD.YYYY') and CB_DATE <= Date#('10.08.2020', 'MM.DD.YYYY')
value = advanced search

miguelbraga
Partner - Specialist III
Partner - Specialist III

I think I know whats happening, you're comparing a number value to a date value. This can be done by changing the expression:

 =CB_DATE >= Date(Max(Num(CB_DATE))-7, 'MM.DD.YYYY')

The previous filter can work because CB_DATE is in the format of a Date.

Try the change please.

Kind regards,

MB

Vittore8
Creator
Creator
Author

runs without an error, but the filter is not applied

miguelbraga
Partner - Specialist III
Partner - Specialist III

Please create a variable in Qlik Sense app with the expression:

=Date(Max(Num(CB_DATE))-7, 'MM.DD.YYYY')

Then put that variable in a text box like this:

=$(vLast7Days)

Does it gives any value? If it gives the value that you need, proceed to put a filter pane object with the field CB_DATE, does the value of the text box is on the same format as the values of the field? If yes, proceed to do reload the metadata on the connection at the Web Console in NPrinting and then change the expression in Advanced Search filter to this:

 =CB_DATE >= $(vLast7Days)

Let me know the results

Vittore8
Creator
Creator
Author

=CB_DATE >= Num(Date(Aggr(Max(TOTAL CB_DATE ),CB_DATE ),'DD.MMYYYY')-7) --Working version!!!

miguelbraga
Partner - Specialist III
Partner - Specialist III

Congrats! If any solution given by me worked, please close the case by selecting the right answer for your problem.

Hope a good day for you.

Best regards,

MB