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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Vince_CH
Creator III
Creator III

Qlik sense: count expression results is not same with list box same counts

Hi All, i make a KPI with counting the purchase times at 4.87K, i also make a list box besides and counts the quantity to be 4370 instead. it seems to be a gap about 500, what could be the cause?

11.jpg

2 Solutions

Accepted Solutions
sunny_talwar

Try to use this for KPI to show the current value in the KPI object

='YTD ' & num(Count(DISTINCT PUR_Price&FiscalYear_order&PUR_Currency&PUR_Currency_1&PUR_Order_Date)/1000,'#,##0.00K;($#,##0.00)')

View solution in original post

sunny_talwar

Not sure, but may you you mean this

Sum(Aggr(
PUR_PRICE
, PUR_Price, FiscalYear_order, PUR_Currency, PUR_Currency_1, PUR_Order_Date)) or Sum(Aggr(
Sum(DISTINCT PUR_PRICE)
, PUR_Price, FiscalYear_order, PUR_Currency, PUR_Currency_1, PUR_Order_Date)) or Sum(Aggr(
Avg(PUR_PRICE)
, PUR_Price, FiscalYear_order, PUR_Currency, PUR_Currency_1, PUR_Order_Date))

View solution in original post

27 Replies
sunny_talwar

What is your exact expression for PUR_Price?
Vince_CH
Creator III
Creator III
Author

Here is my text expression for KPI as below
='YTD ' & num(Count(PUR_Price)/1000,'#,##0.00K;($#,##0.00)')
just simply count the lines, with direct fields in list box in same period.
how can i correct? thanks
sunny_talwar

Is it possible some of the counts of null FiscalYear_order or another dimension which you are suppressing in your chart?
Vince_CH
Creator III
Creator III
Author

Sorry, i am able to upload the sample file due to unknown reason.

but the dimension of all fields in the list box includes the nulls.

11.jpg

sunny_talwar

Convert the file extension to .qvd to load the file. I will change the extension back to .qvf once I download it.
Vince_CH
Creator III
Creator III
Author

it doesn't work either with extension of qvd or qvw too, and the file size is 256kb, beyond the upload limit?
the pop out indication is "The contents of the attachment doesn't match its file type."
Vince_CH
Creator III
Creator III
Author

 Hi stalwar, 

another way is, from below link, you can download the same sample file which i uploaded earlier by .rar in another post, but i cannot do that again by .rar after that. after you unzipping and opening the qvf file, you just need to change the qvf expression text to what i posted above in text expression and pull a list box besides also for comparison. as the my original intention in previous post is to sum the purchase value where i find the error, so i dig in deep and now find the counts of lines are different as mentioned, so   let me know if you have some findings. thanks for the help.

https://community.qlik.com/t5/New-to-Qlik-Sense/Condition-not-working/m-p/1511321/highlight/true#M11...

11.jpg

 

sunny_talwar

I believe the reason you see less number of rows is because some of the rows are getting duplicated... I added Sum(1) as expression and see what I get

 

 

image.png

See how some of the rows have 3, 5, 2... this means that there is more than 1 row which have the same FiscalYear_order, PUR_Order_Date, PUR_Price, PUR_Currency1, PUR_Currency with the same information for these rows.

Vince_CH
Creator III
Creator III
Author

Hi stalwar, thanks for the analysis, i suppose you mean that in list box it only show the DISTINCT row without duplicates, right? what expression text you are using for Sum(1)? However, if i want to make sure all duplicated rows are exactly identical, how to list all duplicated rows in an overview for check?

If they are true identically, in the KPI expression, what expression formula shall i write in details in order to get same DISTINCT counts quantity as the list box? by aggr or? thanks!