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: 
krishna20
Specialist II
Specialist II

aggregate min and max by every metric

Hi Friends,

I have an requirement line the Below mentioned

     This is my input

ACCOUNT_IDPREVCLUSTERCURRCLUSTERSTART_DATE
397394NegativeNeutral05/02/2016
235863PositiveNegative11/02/2016
316168PositiveNegative21/02/2016
316168NegativeNeutral08/03/2016
235863NegativeNeutral16/03/2016
397394NeutralPositive21/03/2016
316168NeutralNegative05/04/2016
397394PositiveNegative16/04/2016
235863NeutralPositive05/05/2016
397394NegativeNeutral11/05/2016
316168NegativeNeutral21/05/2016

I want out put like below mentioned

ACCOUNT_IDPREVCLUSTER CURRENT CLUSTER

397394,Negative,Neutral

235863,Positive,Positive

316168,Positive,Neutral

This out put should Dynamic based on user selection on months

it should be any random month selection also

Thanks,

Ram

9 Replies
Anonymous
Not applicable

Is it that you want months on dashboard for filtering the data?

krishna20
Specialist II
Specialist II
Author

Yes your correct

krishna20
Specialist II
Specialist II
Author

if user select month_year

every account we need to take min date status and max status status

and need to compare

MK_QSL
MVP
MVP

ACCOUNT_IDPREVCLUSTER CURRENT CLUSTER

397394,Negative,Neutral

235863,Positive,Positive

316168,Positive,Neutral


What is the selection here?

krishna20
Specialist II
Specialist II
Author

That does not work in this senario

Because if you bring this status from back end it should be static

But i want Dynamic change

316168NegativeNeutral08/03/2016
235863NegativeNeutral16/03/2016
397394NeutralPositive21/03/2016
316168NeutralNegative05/04/2016
397394PositiveNegative16/04/2016
235863NeutralPositive05/05/2016

if user select mar to may

then status need to change

krishna20
Specialist II
Specialist II
Author

Month

krishna20
Specialist II
Specialist II
Author

user may be  select multiple months

MK_QSL
MVP
MVP

Looks like you didn't understand my question.

You have given sample data and also given and output..

We want to understand that this output is based on what selection?

i.e. What is the selection user will do and what is the output you are looking?

Provide logic behind your requirements.

krishna20
Specialist II
Specialist II
Author

here month is the selection

The Requirement behind this

assume

i have 100 accounts

for every account there is a moment like from date to to date like i mentioned above

The logic i have written here

vFirstcluster=Only({<START_DATE={'$(=min(START_DATE))'}>}PREVCLUSTER)

vEndingCluster=Only({<START_DATE={'$(=max(START_DATE))'}>}CURRCLUSTER)



VNatureofchange=if(vStartingCluster='Negative' and vEndingCluster='Neutral' or


vStartingCluster='Neutral' and vEndingCluster='Positive'  or

vStartingCluster='Negative' and vEndingCluster='Positive' ,1,

if(vStartingCluster='Positive' and vEndingCluster='Neutral' or

vStartingCluster='Positive' and vEndingCluster='Negative'  or

vStartingCluster='Neutral' and vEndingCluster='Negative' ,-1,0))

now what is happening here if i select jan feb and mar it is taking min cluster and max cluster and it is applying for all metrics

but that is not right other metrics have different cluster

Thanks