Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bazzaonline
Creator
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
sunny_talwar

How about sum(spend)/count(Total ordernumber)

View solution in original post

3 Replies
sunny_talwar

May be just this

Count(TOTAL OrderNumber) or Count(DISTINCT TOTAL OrderNumber)

bazzaonline
Creator
Creator
Author

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

sunny_talwar

How about sum(spend)/count(Total ordernumber)