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: 
jim_chan
Specialist
Specialist

AND function?

Hi guys,

I have a script to write.

OK. I have 2 columns Customer ID(001,002) and Change(A,B).


I would like to see records of Customer ID which have change the "change", at below, Customer ID 'A' as made a change from A to B.



DateCustomer IDChange
01/01/2016AA
02/01/2016AB
01/01/2016BB

So, i created a calculated dimension - if(change = 'A' AND change = 'B',Customer_ID). It is not working,.......

16 Replies
kristof_j
Creator III
Creator III

and something like

=if(aggr(Concat( DISTINCT Change, '|', Date), [Customer ID]) = 'A|B', [Customer ID] ,)

This will give you customer A.

tamilarasu
Champion
Champion

Have a look at the attachment.

jim_chan
Specialist
Specialist
Author

Thanks. But i only want a specific pivot table to have such requirements. If i am using the sample that you gave, it would affect the data model.

jim_chan
Specialist
Specialist
Author

Hello Tamil,

Quite close, thanks! can i max() something else? it suppose to be able to show the day 7(before change), and 8(changed) as well. but if i took out the Day dimension and use the caluclated, then i got the Max Day. which is 8.

error.jpg

Rgds,

jim

tamilarasu
Champion
Champion

Fine. I have attached a qvw file. Please check and let me know.

jim_chan
Specialist
Specialist
Author

bro. this one worked fine as i requested.

tamilarasu
Champion
Champion

Great Jim. If you got the answer, please close the thread.