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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

About use dimension field in set analysis again.

Hi All!


I have two tables.

Table1. Customer’s information: customerID, customer_account_age

Table2. Customer’s daily payments: customerID, days_after_registration, spent_value


After that I calculate all spends by days after registration (straight table with one dimension - days_after_registration and one expression sum(spent_value))


The question is how to add in this straight table count of avatars with account age <= then  days_after_registration dimension field.

If this field is not used in the dimension, I would use

COUNT ({<customer_account_age={‘<=days_after_registration’}>} DISITNCT customerID)

But I can't, but I have to.


Thanks.

2 Replies
Nicole-Smith

I'm not sure if this will work, but give it a shot:

COUNT ({<days_after_registration={‘=days_after_registration>=customer_account_age’}>} DISITNCT customerID)


If that doesn't work, I think you may need to do it with an IF statement instead of set analysis:


COUNT(distinct IF(customer_account_age <= days_after_registration, customerID))

jonathandienst
Partner - Champion III
Partner - Champion III

You can't do that sort of comparison using set analysis. The set expression is evaluated once for the table, not row by row.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein