Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Doubt with accumulated expression

Hi

I have to sum(AMOUNT) from the start of the dates to the selected month.

This was working but i don't know why with a few changes i made it doesn't work anymore.

SUM({$< Month= {"<=$(= Only(Month))"}  >}AMOUNT)

Any ideas?

Greetings

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Jeremias - the ONLY() function required only one MonthYear to be available, and that's probably why your formula didn't work. The function MAX() allows multiple months to be available.

View solution in original post

6 Replies
robert_mika
Master III
Master III

Your Expression works for me

(well not sure what your data set thu)

Data:

LOAD * INLINE [

Monht, Type, AMOUNT

1, X, 10

2, X, 20

1, Y, 30

4,Y,20

];

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Robert - your expression "works" only by accident... Notice that the field Month is misspelled in the load, hence the SA expression is simply ignored.

Jeremias - we need to know a bit more. The expression itself looks fine, but there might be other reasons for it not to work - data, chart dimensions, etc... Can you post an example?

cheers,

Oleg Troyansky

www.masterssummit.com - take your QlikView skills to the next level!

Not applicable
Author

I did this and it worked!

SUM({$< MonthYear= {"<=$(=MAX(MonthYear))"}, Month= , Year= >}Amount)

robert_mika
Master III
Master III

Thanks Oleg..

I should put my head down now,....

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Jeremias - the ONLY() function required only one MonthYear to be available, and that's probably why your formula didn't work. The function MAX() allows multiple months to be available.

Not applicable
Author

thank you for your help