Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chin_IT
Contributor II
Contributor II

Aggregation calculation

I am having issues with in Qlkiview into what calculation I will need to do. 

 

=max( aggr( count([DATE]), Stock))/ sum (Stock)

This will return the values I will need, for example 0.7, or 0.65, however, I need that calculation, but to work out how to return the results that will be less than 1. 

Labels (2)
18 Replies
Chin_IT
Contributor II
Contributor II
Author

Sunny,

Thank you very much again. And if I wanted to calculate the average of the results, what would the calculation be?

Avg(Aggr( If(Count([DATE])/Sum(Stock) < 1, 1, 0) , Piece)) 

Would it be that calculation above?

 

 

sunny_talwar

Avg of what result?

Chin_IT
Contributor II
Contributor II
Author

Sorry it is for another part.

It will be the average of the stockturn in the image file. But I will want to group it by the Piece Dimension. I have had a few tries, but, it keeps returning with null values

Chin_IT
Contributor II
Contributor II
Author

Also, how would I can use the calculation to only show the values that are less than 1, and return true, so all the false values, will not appear in the table.

Sorry for asking so many, questions as I am fairly new to QlikView, but I really appreciate your help Sunny!

Chin_IT
Contributor II
Contributor II
Author

Sunny,

Would you know why this happens, where some are not returning as true?

sunny_talwar

I really wish to help, but looking at just images is not helping me understand your issue... would you be able to provide a sample (qvw file) where you can show what you have and what exactly are you trying to get?

Chin_IT
Contributor II
Contributor II
Author

I am not so sure I can, since this is a dashboard for a client. I will import some clearer images and representation of what I am looking for.

Stockturn less than 1

You provided me with the calculation, but the problem is that all the numbers that are under 1, do not return as 1, some do. (Can be seen in images Stockturn.PNG and Stockturn6.PNG) 

 

 

Chin_IT
Contributor II
Contributor II
Author

I have managed to fix this, I believe it is ok.

 

 

Chin_IT
Contributor II
Contributor II
Author

My proposition is where as you can from the image file, how would I just be allowed to show just all the values with 1, not with 0. So all the true statements are in the table.

 

*Ignore the blue cirlce*