Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
paolojolly
Creator
Creator

count occurrences of min value

Hi, i need help in qlikview document for calculating the count occurrences of min value in pivot chart

In the attached document for calculating the occurrences of the minimum price for C_FAMIGLIA_RIL field i use

sum( if( W_PRZ_PUBBL_FAM = Aggr( Min(W_PRZ_PUBBL_FAM) , C_FAMIGLIA_RIL) , 1 , 0))

but it is not working properly

can someone help me?

thanks

1 Solution

Accepted Solutions
sunny_talwar

May be this:

=Sum(Aggr(If(W_PRZ_PUBBL_FAM = Min(TOTAL <C_FAMIGLIA_RIL> W_PRZ_PUBBL_FAM), 1, 0), C_FAMIGLIA_RIL, C_NEGOZIO))


Capture.PNG

View solution in original post

7 Replies
Anil_Babu_Samineni

Are you expecting 2 for 00A and 0 for 00B, Or what

If yes, You can use this

=count({<W_PRZ_PUBBL_FAM = {'=$(Min(W_PRZ_PUBBL_FAM))'}>}C_FAMIGLIA_RIL)

If you are expecting 24, 5 then might Adam Solution Work

=count({<W_PRZ_PUBBL_FAM = {'=Min(W_PRZ_PUBBL_FAM)'}>}C_FAMIGLIA_RIL)

OR If you are expecting 1, 1 Then you can use DISTINCT

=count({<W_PRZ_PUBBL_FAM = {'=$(Min(W_PRZ_PUBBL_FAM))'}>} DISTINCT C_FAMIGLIA_RIL)


Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paolojolly
Creator
Creator
Author

i'm expecting

   

C_FAMIGLIA_RILmin value of W_PRZ_PUBBL_FAM
occurrences of min value
00A0,692
00B0,75

1

thanks

adamdavi3s
Master
Master

I deleted my answer as looking at the data it was not correct.

I think 2 and 1 is the correct answer?

paolojolly
Creator
Creator
Author

yes

thanks

sunny_talwar

May be this:

=Sum(Aggr(If(W_PRZ_PUBBL_FAM = Min(TOTAL <C_FAMIGLIA_RIL> W_PRZ_PUBBL_FAM), 1, 0), C_FAMIGLIA_RIL, C_NEGOZIO))


Capture.PNG

View solution in original post

paolojolly
Creator
Creator
Author

It works perfectly

thank you so much

sunny_talwar

No problem at all