Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear QlikView-Community,
I'm new to Qlikview and I'm trying to get the minimun revenue and the maximum revenue by customer dimension for each customer segment and the grand total.
a) Max (aggr(Sum(revenue), customer)) is working fine
b) Min (aggr(Sum(revenue), customer)) isn’t working in the grand total line of a table chart. It returns 0 although the sum(revenue) of the "smallest" customer is 232 EUR.
Kind regards,
Herbert
P.S.:
I'm currently working with the personal edition.
The data model is: customer segment > customer > order < product
A copy of the problem is:
@ min sum aggr
Nachricht geändert durch Herbert Beck
What are the Name of Dimensions in this table?
if possible, kindly upload your sample file.
Dear Manish,
thanks for your reply. My application is in German, therefore I translate it for you to English.
the only dimension is customer (in the picture: KundenNr). The revenue corresponds to UmsatzBestZeile.
Kind regards,
Herbert
can you upload your application?
Dear Manish,
well it's still too big. I will downsize it.
Kind regards,
Herbert
Hi Manish,
I'm sorry it took a little while. When downstripping the application I found that the problem ist related to the time dimension. Therefore a come up with new numbers but the problem remains the same:
The data model is:
Hi Herbert,
Due to the way you built the calendar table, you populate dates for wich there are not order then when using the aggr function, QV creates a row with sum(revenue)=0 for all the dates where there is no revenue (missing values)
You should use :
Min (aggr(Sum({<revenue={"<>0"}>}revenue), customer_id))
Michael.
Try changing the expression total to Min like in the picture below.
Hi Micheal,
thank for your reply. i tried it, but there is no change in the grand total line. An the amazing fact is that it works with the expression Total in max column. I assume that there might be a problem with other dimensions.
Kind regards,
Herbert
Hi Herbert,
Due to the way you built the calendar table, you populate dates for wich there are not order then when using the aggr function, QV creates a row with sum(revenue)=0 for all the dates where there is no revenue (missing values)
You should use :
Min (aggr(Sum({<revenue={">0"}>}revenue), customer_id))
Michael.