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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
plaatkoek
Contributor II
Contributor II

Set Analysis - Use the same field twice

Hi

I'm using Decision_Date twice in the below set analysis. But what I find is that it only show results for the second one. It completely discards the first expression "Decision_Date = {">=$(=(date(vDashboardStartDate,'YYYY/MM/DD')))<=$(=(date(vDashboardEndDate,'YYYY-MM-DD')))""

Can you use the same field twice for different purposes in set analysis?

=sum({<Decision_Date = {">=$(=(date(vDashboardStartDate,'YYYY/MM/DD')))<=$(=(date(vDashboardEndDate,'YYYY-MM-DD')))"},

Decision_Date = {"<=$(=(date(vCanvasserChangeDate,'YYYY/MM/DD')))"},Canvasser_App_Ind = {'Yes'},

[Decision_Result] = {'Approved'}>}Number_of_Appl)* 120

Thanks!

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

If this is an AND condition, then you might need to use * instead of +

=sum({<Decision_Date = {">=$(=(date(vDashboardStartDate,'YYYY/MM/DD')))<=$(=(date(vDashboardEndDate,'YYYY-MM-DD')))"} * {"<=$(=(date(vCanvasserChangeDate,'YYYY/MM/DD')))"},Canvasser_App_Ind = {'Yes'},

[Decision_Result] = {'Approved'}>}Number_of_Appl)* 120

View solution in original post

3 Replies
agigliotti
MVP
MVP

it's working as designed.

you can do as below if you want to apply an OR operator:

=sum({<Decision_Date = {">=$(=(date(vDashboardStartDate,'YYYY/MM/DD')))<=$(=(date(vDashboardEndDate,'YYYY-MM-DD')))"} + {"<=$(=(date(vCanvasserChangeDate,'YYYY/MM/DD')))"},Canvasser_App_Ind = {'Yes'},

[Decision_Result] = {'Approved'}>}Number_of_Appl)* 120

I hope it helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
sunny_talwar
MVP
MVP

If this is an AND condition, then you might need to use * instead of +

=sum({<Decision_Date = {">=$(=(date(vDashboardStartDate,'YYYY/MM/DD')))<=$(=(date(vDashboardEndDate,'YYYY-MM-DD')))"} * {"<=$(=(date(vCanvasserChangeDate,'YYYY/MM/DD')))"},Canvasser_App_Ind = {'Yes'},

[Decision_Result] = {'Approved'}>}Number_of_Appl)* 120

plaatkoek
Contributor II
Contributor II
Author

Thanks Andrea and Sunny. Both is correct. I didn't know you can use "and" and "or" conditions like this in the set analysis.

Learned something new today.