Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of revenue per customer per year with condition

Dear all,

I have the following issue:  I am trying to get a sum of revenue per customer per year, but only for years that the customer has exceeded a predetermined sum of of revenue for that year.

eg:

aa 2015 100

bb 2013 50

cc 2015 110

aa 2015 80

bb 2014 40

cc 2015 90

bb 2014 70

show customer data only when yearly sum over 100

result WITHOUT the condition

aa 2015 180

bb 2013 50

bb 2014 110

cc 2015 200

result WITH the condition

aa 2015 180

bb 2014 110

cc 2015 200

So far I am unable to solve it.  Any ideas?

Thank you

5 Replies
Anil_Babu_Samineni

May be this? Attached the qvw

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Kushal_Chawda

Data:

LOAD *,

          rowno() as Row

FROM Data

Create straight table

Dimension:

Category

Year

Expression:

1) Without condition

=sum(Revenue)

2) With condition

=sum({<Row={"=sum(Revenue)>100"}>}Revenue)

antoniotiman
Master III
Master III

HI,

DIm : ID,Year

without condition Expr :

Sum(Value)

with condition

If(Sum(TOTAL <ID,Year> Value) > 100,Sum(Value))


egards,

Antonio

zebhashmi
Specialist
Specialist

try this

If (Sum(A)>100,sum(A))

zebhashmi
Specialist
Specialist

can you share the condition please