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: 
antonaks
Creator II
Creator II

Change to Set Analysis

Hello colleagues, 

Please, give me advice how, can I change this IF expression for set analysis analog?

if ((Date(last_date) - Date(date)) > 30, Count(distinct user_id),0)

 

Labels (1)
1 Solution

Accepted Solutions
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

 Maybe you can create the day's difference in the back end

Date(last_date) - Date(date) as DateDiff

you can use this expression in the front end

Count({<Days={">=30"}>}OrderID)

You can use directly in expression but it should be KPI and dates should be filtered

Count(distinct  {<$(=Fabs(max(last_date) - max(date)))={">=30"}>}user_id)

Hope this info helps

Thanks

Thanks and Regards
Kashyap.R

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Set analysis is a filter, not a conditional. Therefore you can't replace that If with a set expression.

If you meant Count(If(....)), then you could use a set expression, but that is very different (with a different result) to what you posted.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
antonaks
Creator II
Creator II
Author

I'm sorry. Yes I mean  Count(If(....)) expression. 

Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

 Maybe you can create the day's difference in the back end

Date(last_date) - Date(date) as DateDiff

you can use this expression in the front end

Count({<Days={">=30"}>}OrderID)

You can use directly in expression but it should be KPI and dates should be filtered

Count(distinct  {<$(=Fabs(max(last_date) - max(date)))={">=30"}>}user_id)

Hope this info helps

Thanks

Thanks and Regards
Kashyap.R