Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
dunnalahk123
Creator III
Creator III

Set Analysis

Hi,

I am trying write on expression in set analysis.

=Sum({$<Distinct [ASDP Name] =>}[CSNUM])

=(AGGR(SUM(DISTINCT [CSDEN]),[ASDP Name]))

basically i need For Distinct ASDP Name what is the sum of NUmerator.

Can some one help me here.

Best Regards,

HK

1 Solution

Accepted Solutions
neelamsaroha157
Specialist II
Specialist II

Let me know if it gives the desired output. I tried on my end and it seems to work.

View solution in original post

13 Replies
Anil_Babu_Samineni

Expression seems not the correct syntax

=Sum({$<Distinct [ASDP Name] =>}[CSNUM])

Use this

=Sum({$<[ASDP Name] =>} DISTINCT [CSNUM])

Seems, second expression correct to me, Is there any wrong output?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dunnalahk123
Creator III
Creator III
Author

Hi Babu,

Thank You.

But i need For Distinct ASDP Name i need sum of numerator.

Best Regards,

Anil_Babu_Samineni

Again Confused, And field looks like Character. How do you sum for Character. May explain bit more with sample data

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dunnalahk123
Creator III
Creator III
Author

Hi,

I attached APP above.

Best Regards,

neelamsaroha157
Specialist II
Specialist II

It would be easier if you can share sample data.

Can one CSDEN have multiple CSNUM??

dunnalahk123
Creator III
Creator III
Author

HI,

For CS DEN is nothing but my Denominator or CSNUM  is nothing but my Numerator always it will be  1 or 0 it is my Calculated fields .

if you go to raw details tab For one ASDP NAME have mutiple rows.

So in piviot when i do sum for one ASDP Name it should be counted only once.

Best Regards,

neelamsaroha157
Specialist II
Specialist II

Check this out.

I didn't get what is the issue that you are facing but I have added multiple columns to reflect the result set.

Let me know if this helps.

dunnalahk123
Creator III
Creator III
Author

Hi Neelam,

Thank you.

Basically when i collapse the pivot for AMS CSNUM should be 13 which is my Numerator and CS DEN will be 18 which is my Denominator.

So it's not working as Expected at this moment.

Best Regards,

neelamsaroha157
Specialist II
Specialist II

Check this out.