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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources 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

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
Partner - Champion
Partner - Champion

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.

sunny_talwar

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.