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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
akuttler
Creator
Creator

Sum Total with Set modifier Distinct Field

Hello I am trying to sum total encounter charges for distinct ENCID's.

I tired the expression below but it gives me 0.00

Sum({<ENCID={'Distinct ENCID'}>}[ENCID Total Charges])

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Did you forget to add DISTINCT?

Sum (Aggr (Sum(DISTINCT [ENCID Total Charges]), ENCID))

View solution in original post

4 Replies
Thiago_Justen_
MVP
MVP

Try this:

Sum (Aggr (Sum([ENCID Total Charges]), ENCID))

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
sunny_talwar
MVP
MVP

Did you forget to add DISTINCT?

Sum (Aggr (Sum(DISTINCT [ENCID Total Charges]), ENCID))

Thiago_Justen_
MVP
MVP

My fault stalwar1‌. You're right!

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
akuttler
Creator
Creator
Author

Thank you! It works.