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

Counting of non negative Values

Hi Team,

Please refer below details i need the help to count only positive value excluding 0. in total i need to need count of if can anybody help me on this.

 

 

Distributor Name Sub Dealer Name YTD-2024 label_1
A AA 1 1
B AA -1 0
C Bc 2 2
D BD -1 1
E SD -1 1
F FE -1 1
Total   -1 6
1 Solution

Accepted Solutions
stou
Contributor III
Contributor III
Author

17 Replies
Anil_Babu_Samineni

@stou This sounds using Sum() can help by default. Isn't it?

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
stou
Contributor III
Contributor III
Author

Hi @Anil_Babu_Samineni i did count but im getting in sum can you help me out this.

i need the count of only positive numbers.

refer the below snap. i need this type of result coloumn name is lable can you help me out. 

 

Distributor Name Sub Dealer Name YTD-2024 label_1
A AA 1 1
B AA -1  
C Bc 2 1
D BD -1  
E SD -1  
F FE -1  
Total   -1 2
Anil_Babu_Samineni

@stou perhaps this?

Count({<[Distributor Name]={"=Sum([YTD-2024])>0"}>} [YTD-2024])

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
stou
Contributor III
Contributor III
Author

@Anil_Babu_Samineni Im facing error in it..

stou
Contributor III
Contributor III
Author

@Anil_Babu_Samineni  im facing this type of error.

 

stou_0-1711430534409.png

 

Anil_Babu_Samineni

@stou Please always post what error it shows, Because I don't have visibility how [YTD-2024] is formed?

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
PrashantSangle

I tried simple expression, considering ytd-2024 is column

this expression is giving me output Sum(if([YTD-2024]>0,1))

PrashantSangle_0-1711430725718.png

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anil_Babu_Samineni

@stou I could see the YTD in blue color, It means that it took as Measure label hence please share what expression used to calculate the measure.

Anil_Babu_Samineni_0-1711430977838.png

I can see @PrashantSangle shared his thoughts, that also works (One suggestion, Instead of Sum try to use Count as you need count).

 

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
stou
Contributor III
Contributor III
Author

@PrashantSangle   but in my case it is showing 0 not the sum  of that 1.