Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hossein_heydarniya
Contributor
Contributor

Aggr question

Hello,

I have a problem and cannot solve it, I was wondering one of you guys can help me here.

I have a table like this and I need to find out how much is total value of sales orders under and above $2000. (Aggregated by sales orders not Sales order_Line)

Sales_orderLineValue
19355731 $        489.44
19355732 $    2,068.44
19355733 $        633.60
21900571 $        437.65
22425571 $        560.56
21900572 $  20,125.00
22387341 $  13,989.97
22400071 $        120.00
22400072 $        400.00

 

I am using this expression for above $2000 but it doesn't work:

=Sum(Aggr(Sum({<Value= {">=2000"}>}Value),Sales_Order,Value))

Thank you,

Hossein

Labels (4)
1 Solution

Accepted Solutions
sunny_talwar

This?

Sum({<Sales_Order = {"=Sum(Value) >= 2000"}>} Value)

View solution in original post

3 Replies
sunny_talwar

This?

Sum({<Sales_Order = {"=Sum(Value) >= 2000"}>} Value)
dplr-rn
Partner - Master III
Partner - Master III

add dimension like =if(aggr(sum(Value),Sales_order)>2000,Sales_order)

measure Sum(Value)

 

result

Capture.PNG

hossein_heydarniya
Contributor
Contributor
Author

Thank you sunny. It works perfectly.

I am really surprise actually the way this expression works.