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

Aggr in modifier of Set analysis condition not working

Hi,

   i have one expression as - sum((if(aggr(sum(TOTAL_PA_CAT_CLAIMS_LOCAL),CLAIM_ID_KEY)> vCatastrophic, TOTAL_PA_CAT_CLAIMS_LOCAL)))

     i want to use set analysis instead,

     i tried -

SUM(DISTINCT {<CLAIM_ID_KEY={'=sum(TOTAL_PA_CAT_CLAIMS_LOCAL)> $(vCatastrophic)'} >} TOTAL_PA_CAT_CLAIMS_LOCAL)

     but not giving expected result, Please let me know correct expression for same

Thanks in advance

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.


SUM({<CLAIM_ID_KEY={'=Sum(Aggr(sum(TOTAL_PA_CAT_CLAIMS_LOCAL),CLAIM_ID_KEY))> $(vCatastrophic)'} >} TOTAL_PA_CAT_CLAIMS_LOCAL)


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

This expression also giving same result as i used earlier set analysis

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try changing CLAIM_ID_KEY to other field which is unique in your data.


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
karthikoffi27se
Creator III
Creator III

Hi Ankit,

What is your expectation, can you give a sample output.

Many Thanks

Karthik

sunny_talwar

Why Sum(DISTINCT...)? I mean it is highly discouraged to use DISTINCT with sum.... Also, you if statement did not use Dollar sign expansion... may be don't use in set analysis also... Finally, use double quotes instead of single quotes for your search string.....try this

Sum({<CLAIM_ID_KEY = {"=Sum(TOTAL_PA_CAT_CLAIMS_LOCAL) > vCatastrophic"}>} TOTAL_PA_CAT_CLAIMS_LOCAL)