Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
lomi89
Contributor III
Contributor III

Special Cohort analyses

Hi Team,

I would like to create an automatic analyses based on groups.

I try to show you with this example:

I have this database where the claims changes the Cost depends on the month and they are different status:

ClaimDateStatusCost
1111may-20Open5000
1112may-20Cosed6000
1113may-20Open7000
1111jun-20Open6000
1112jun-20Re-Open7000
1113jun-20Cosed8000
1111jul-20Closed7000
1112ago-20Open8000
1113sep-20Cosed8000

 

I would like to show, for example: Show the claims with Status Open in may-20:

Claimmay-20jun-20jul-20
1111500060007000
1113700080008000

 

Could be possible with pivot table and filters (working in set analyses)? I would like it would be dynamic and changing the filters.

Thank you very much.

 

 

 

 

 

 

1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

I think you would use Set Analysis & P() function, so start with;

Sum({<Claim=P({<Date={'may-20'},Status={'Open'}>}Claim) >}Cost)

You may need a variable to input your date & have further requirement about what to do when they close, but think that is a start.

Cheers,

Chris. 

View solution in original post

4 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I think you would use Set Analysis & P() function, so start with;

Sum({<Claim=P({<Date={'may-20'},Status={'Open'}>}Claim) >}Cost)

You may need a variable to input your date & have further requirement about what to do when they close, but think that is a start.

Cheers,

Chris. 

lomi89
Contributor III
Contributor III
Author

Hi, thank you very much.

I consider it is the good function but I have a problem with the date:

Sum({<CLAIMS=P({<DT_EXC = {'(01/01/2021)'},STATUS={'1'}>}CLAIMS) >} COST)

lomi89_0-1626717615522.png

Do you know how I could resolve the problem?

 

Thank you!

 

chrismarlow
Specialist II
Specialist II

Hi,

If your date includes the timestamp then think you are going to need it to & you seem to have some brackets (have you used a variable here?), you want to be getting to;

Sum({<Claim=P({<Date={'01/01/2021 00:00:00'},Status={'Open'}>}Claim) >}Cost)

Unless you need to know if it was open in a month of dates .. in which case do you have a master calendar?

Cheers,

Chris.

lomi89
Contributor III
Contributor III
Author

Yes, I have to do it.

Thank you very much Chris.