Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
justalkak
Partner - Contributor III
Partner - Contributor III

Disregard filtering on function in Set Analysis

Hi,

can you suggest please how I could modify the set analysis below so that the [Actual Start Date Category A] doesn't react to Year field (which is associated to [Actual Start Date Category A] in data model)

count({<[Actual Start Date Category A] = {">$(=AddYears(today(),-1))"}>} distinct [Category B]).

This modification doesnt work:

count({<Year=, [Actual Start Date Category A] = {">$(=AddYears(today(),-1))"}>} distinct [Category B])

Labels (1)
4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

For starters, try enclosing your $-sign expansion in single quotes (assuming that all date fields are fully formatted dates and not just numbers). Maybe that's the cause of the problem.

If that doesn't help, you can try using the function P() for your filter. Inside this function, you can add its own Set Analysis, where you can disregard the Year etc. 

If you post a sample app, we could take a look and suggest other improvements.

To learn more about advanced Set Analysis, come to my session at the Masters Summit for Qlik, which is coming to Hamburg this September.

Cheers,

justalkak
Partner - Contributor III
Partner - Contributor III
Author

Unfortunately I cannot download or upload any app. 

Any idea how to write this inside function to disregard Year selection? Thanks

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, based on information provided your expression should ignore "Year" field selection.

count({<Year=, [Actual Start Date Category A] = {">$(=AddYears(today(),-1))"}>} distinct [Category B])

Question is: Is it really [Year] field you are applying selections on? or maybe it is derived field from autocalendar, or maybe field which has alias or label and underlying field name is different. 

We obviously dont know that. What we know is that with given information syntax is correct.

cheers

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.
kevincase
Creator II
Creator II

Justalkak,

I'm assuming here that you have a filter for Year and you want to ignore any user selections.  If that is the what you are asking, try, something like this:

count({1<[Actual Start Date Category A] = {">$(=AddYears(today(),-1))"}>} distinct [Category B])

Where I inserted the 1 is typically a $.  

Kevin ....