# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for
Did you mean:  Creator

## Dividing by a count ignoring a dimension expression

Hello,  I have a stacked chart with has two dimensions.

Order Month and then a sum of the spend to group by bands

= Aggr( if(Sum(spend)<3000,dual('0-3k',1), if(Sum(spend)<=10000,dual('3k-10k',2), if(Sum(spend)<=100000,dual('10k-100k',3), if(Sum(spend)<=300000,dual('100k-300k',4), dual('300k+',5))))),OrderNumber)

I then have an expression sum(spend) which gives me a stacked chart showing the amount of spend by the amount of the order.  I want to be able to divide this by the total count of OrderNumber.

Any ideas  ie if I had three orders, two at 20 and one at 10.  It would do a bar 20 / 3 and then stacked on top 10 / 3??

1 Solution

Accepted Solutions  MVP

3 Replies  MVP

May be just this

Count(TOTAL OrderNumber) or Count(DISTINCT TOTAL OrderNumber)  Creator
Author

I tried sum(spend)/count(Distinct Total ordernumber) and the result is much to low?  MVP 