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

Sum Aggr with condition

Hi guys,

How can I use a condition on the following expression?

SUM(AGGR(SUM(DISTINCT Points), TransID))

the condition i want to apply is {$<[Date_ID.autoCalendar.Year]={'2016'}>}

I tried like this:

SUM({$<[Date_ID.autoCalendar.Year]={'2016'}>} AGGR(SUM(DISTINCT Points), TransID))

but it didn't work.


Can you help me?

Thanks in advance,

Miguel Cunha

Labels (1)
12 Replies
its_anandrjs

Attaching the Output

OP9.PNG

Anonymous
Not applicable
Author

Hi Stefan,

Actually, I'm trying to calculate this in dashboard, in a table, with the Expression Editor.

I said "it didn't work" because the result was not correct.

Anonymous
Not applicable
Author

Anand, Thanks for your help.

I tryed it like this =SUM( {$<Year={'2016'}>} AGGR(distinct Points, TransID))

and I think it gave me the correct result (I'm going to check with sql right now).