Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having some troubles while using a filter un NPrinting for an App, I would appreciate any help.
In the QlikSense App I have a KPI with a formula that includes a SetAnalysis expression in which I have a field (named "Compare") where evalues if it is selected or not in order to apply one expression or another in the SetAnalysis. In NPrinting, I created a filter for Compare field and when I've generated the report with this KPI, it shows the result of the formula WITHOUT the Compare field selected (like there is no filter applied).
Is there any conflict or problem between a filter in NPrinting for a field that it is included in a formula for a KPI??
Thanks in advance.
Best regards,
Pariente
Hi @Pariente ,
First thing to check would be to ensure that your filter is applied.
Can you share screenshot of your filter in NPrinting please?
Typically for this you would expose column [Compare] in form of table to see if the filter indeed is carried through to the report properly. Can you do that for testing please and confirm that your NPrinting filter works? It may be that the issue is not expression but simply the fact that filter is not properly applied. If it isn't applied then we would need to look at:
more about filters in here:
on the side note and not really related to the problem:
in the formula there is no need for date() function. The reason is the AddYears supersedes it anyway:
if anything it should be like this but only if you need to change date mask from default one:
cheers
Lech
Hi @Pariente
I think it would be helpful if you could provide some additional context:
With this additional information I'm sure someone here may be able to point you in the right direction.
Kind regards...
Hello and thanks for your reply.
The formula is the following:
Sum( {< Date={">=$(=if(Compare='A3',(AddYears(date(min(Date)),-3)),(AddYears(date(min(Date)),-1))))<=$(=if(Compare='A3',(AddYears(date(max(Date)),-3)),(AddYears(date(max(Date)),-1))))"} >} Sales)
I have to tables in the App, one with all the data from sales from all the countries, and another one just with one column (not related with the first table). Basically the formula shows the sales from the previous year of the selected date, unless you select this flag (Compare field) so it compares with Year-3.
The formula works perfectly in the App, but I am not able to make the filter Compare in NPrinting in order to make this formula work. I want a single task in NPrinting with 2 reports (PDF) attached, one without the Compare filter (this way it shows data of Year-1) and a second report (PDF too) but with the filter Compare. I created 2 reports, one of them with the filter and the other without, but both PDF's shows the numbers of Year-1.
Thanks in advance,
Pariente
Hi @Pariente ,
First thing to check would be to ensure that your filter is applied.
Can you share screenshot of your filter in NPrinting please?
Typically for this you would expose column [Compare] in form of table to see if the filter indeed is carried through to the report properly. Can you do that for testing please and confirm that your NPrinting filter works? It may be that the issue is not expression but simply the fact that filter is not properly applied. If it isn't applied then we would need to look at:
more about filters in here:
on the side note and not really related to the problem:
in the formula there is no need for date() function. The reason is the AddYears supersedes it anyway:
if anything it should be like this but only if you need to change date mask from default one:
cheers
Lech
Hello Lech,
The Compare field it was a dual field... I just modified it and now it is not a dual, and the filter works perfectly... That was the problem.
Thank you so much.
good news - cheers