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

Total minus selected count

Hi guys,

I'm trying to add an object to count total minus selected values you can see highlighted in yellow in the "Current Selection" object for the field "Siti.COD_STRUMENTO_PDR":

As you can see, the total is 158999 and 158967 is the total of selected values, so the number i'd like to have in the new object is 32 (with or without the two totals, even the simple result of the substraction is perfect):

158999 -

158967 =

        32

Can anybody help me? N.B. I can't work on the scritp and i can't upload the file because i'm using a shared document.

Thanks in advance,

Andrea

1 Solution

Accepted Solutions
qv_bazz_10
Creator
Creator
Author

@ Sunny and Anil: i tried both your expressions but i didn't get the result i was searching for. Anyway, triyng them, I found the solution with the function "GetExcludedCount":

=GetExcludedCount (Siti.COD_STRUMENTO_PDR)

Thanks a lot for your help!

Andrea

View solution in original post

3 Replies
sunny_talwar

May be like this in a text box object

Count({1} Siti.COD_STRUMENTO_PDR) - Count(Siti.COD_STRUMENTO_PDR)

Anil_Babu_Samineni

Try this

Sum(total field) - sum({1<field = {$(=getfieldvalues(field))}>}field)

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
qv_bazz_10
Creator
Creator
Author

@ Sunny and Anil: i tried both your expressions but i didn't get the result i was searching for. Anyway, triyng them, I found the solution with the function "GetExcludedCount":

=GetExcludedCount (Siti.COD_STRUMENTO_PDR)

Thanks a lot for your help!

Andrea