Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gabroteddy
Contributor III
Contributor III

count change between two dates

Hi at all,

i want count how many times a patient change therapy.

I have a table like this (i attach the excel file):

NUMMOVPATIENTDESCRDATA_DELPHARMA_CODE
67489PROVA PAZIENTE1ZELITREX*21 CPR RIV. 1000 MG19/12/2017029503024
67490PROVA PAZIENTE2KIVEXA*600+300MG 30 CPR18/12/2018036644019
67491PROVA PAZIENTE2ISENTRESS*400MG 60CPR18/12/2018038312017
67492PROVA PAZIENTE3ISENTRESS*400MG 60CPR14/12/2019038312017
67493PROVA PAZIENTE1TIVICAY*30CPR RIV 50MG14/01/2020043195015
67494PROVA PAZIENTE1LAMIVUDINA MY*60CPR RIV 150MG14/01/2020040485029
67495PROVA PAZIENTE2KIVEXA*600+300MG 30 CPR15/01/2020036644019
67496PROVA PAZIENTE2ISENTRESS*400MG 60CPR16/01/2020038312017
67497PROVA PAZIENTE1CELSENTRI*300MG 60CPR RIV14/02/2020038138083
67498PROVA PAZIENTE3ISENTRESS*400MG 60CPR15/02/2020038312017
67499PROVA PAZIENTE2ZELITREX*21 CPR RIV. 1000 MG16/02/2020029503024

 

I want to count whenever a  PATIENT has therapy changes (DIFFERENT PHARMA_CODE) between two delivery dates (DATA_DEL).

In the example the 

PROVA PAZIENTE1 have n.3 CHANGES

PROVA PAZIENTE2 have n.1 CHANGE

PROVA PAZIENTE3 have n.0 CHANGE

Can you give me the correct expression for count these occurences?

1 Reply
Brett_Bleess
Former Employee
Former Employee

I would suggest you browse/search in the Design Blog area, you will likely find some examples there to assist you with things.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Just use the search box to look for related posts, I would recommend starting with a single word, see what comes back and narrow from there using other words.  There are hundreds of posts in this area, mostly how-to, so something here should likely get you on the right track.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.