Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SetAnalysis not working?

Hello,

I am trying to use set analysis to filter my pivot-table to show only the latest month data.

I am currently using the following statement:

Sum({<[Campaign]={'Campaign A'},  = {">$(=0)<$(=100)"}>} Value)

This statement works and it shows table. It is filterable with the datefield.

But when I try to add this datefield to the setanalysis thing, the table does not show anything anymore.

Sum({<[Campaign]={'Campaign A'},  = {">$(=0)<$(=100)"}, DateField={$(=Max(DateField))} >} Value)


Or if I use variable for that, same thing - nothing.



How is this possible that it does not show anything?

Is this solvable at somehow?



Cheers,

Niko

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Maybe this works?

Sum({<[Campaign]={'Campaign A'},={">$(=0)<$(=100)"},

                                DateField={'$(=Date(Max(DateField)))'}>}Value)



View solution in original post

5 Replies
Anonymous
Not applicable
Author

Dear Niko,

Can you post the qvw sample,

So, we can see whats going on here.

Regards,

Winston

PrashantSangle

Hi,

Check your date format.

is your dateField contain day to day value or monthly value??

Post sample app if possible.

Kind Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Maybe this works?

Sum({<[Campaign]={'Campaign A'},={">$(=0)<$(=100)"},

                                DateField={'$(=Date(Max(DateField)))'}>}Value)



Not applicable
Author

Well that did work, thank you very much! Amazing

Cheers,

Niko

Peter_Cammaert
Partner - Champion III
Partner - Champion III

To make it less cryptic to you: Set analysis assignments like this need the format of the values between braces to be exactly the same as the DateField format. Max() always returns a number which apparently is different from what DateField expects. The modification I proposed switches the date specification from numeric (number of days since...) to string (like D/MM/YYYY or whatever you have set as default).

Enjoy QlikView and the Qlik Community

Peter