Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DaniCalifornia
Contributor III
Contributor III

Set analysis select different filter

I added the below pink text to my set analysis. I want it to use all of my filters, but instead of the evaluation date I have selected, I want it to use an evaluation date 1 year in the past. It seems to work in my text as it displays the correct date, but my actual set analysis does not seem to adjust to the new date. 

I have 2 pie charts next to each other - I want to compare the same stats a year apart, but the values are exactly the same. 

If I use a 1 instead of $ and specify each filter =$:: the selected filter, I get the right results, but I should not have to specify every single filter. It is still applying my original evaluation date. 

=SUM( {$<ClaimStatusId = {"2","3"}, EvaluationDate={"=AddYears(EvaluationDate, -1)"}>} ReserveTotalEval)/
Count( {$<ClaimStatusId = {"2","3"},EvaluationDate={"=AddYears(EvaluationDate, -1)"}>} DISTINCT ClaimId)

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try making sure the date formats match. Try like:

EvaluationDate={'$(=Date(AddYears(EvaluationDate, -1), 'DateformatOfEvaluationDate'))'}

 

If this doesn't work try to share a sample file.

View solution in original post

4 Replies
tresesco
MVP
MVP

Try with this small correction.

EvaluationDate={'$(=AddYears(EvaluationDate, -1))'}

DaniCalifornia
Contributor III
Contributor III
Author

That gives me zero results.

I think I tried that and every other permutation I could find. The one I posted is the only one that gave me results, but they are wrong. 

tresesco
MVP
MVP

Try making sure the date formats match. Try like:

EvaluationDate={'$(=Date(AddYears(EvaluationDate, -1), 'DateformatOfEvaluationDate'))'}

 

If this doesn't work try to share a sample file.

DaniCalifornia
Contributor III
Contributor III
Author

I did get it to work!!! Thank you very much! 

 

DaniCalifornia_0-1593106410448.png