Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem building an expression

Hello guys!

I have a problem building an expression:

=sum({$<Year={$(=FieldValue('Year', $(=Valueloop(1,100))))}>}[Total N $(=maxstring(Unit))])

This expression don't work because it don't execute the function Valueloop.

All i want to do in this expression is to dynamically do the sum for each year that i've got.

Can someone help me please?

Thanks,

Regards,

Loïc

1 Solution

Accepted Solutions
rubenmarin

Hi loic,

Maybe i don't undertad the full requirements, both examples in your last post is the normal behaviour of qlikview, don't need of set analysis:

=sum([Total N $(=maxstring(Unit))])

I'm missing something? can you upload a sample and what you expect?

View solution in original post

4 Replies
rubenmarin

If you want all years you can remove year selection in set analysis:

=sum({$<Year>}[Total N $(=maxstring(Unit))])

Not applicable
Author

Hello,

Thanks man, but in your expression you don't take care about the selection of the year.

For example, i have 3 years: 2012, 2013 and 2014.

I want 3 columns with de sum ==> this is ok with your expression

If the user select 2012 and 2014 i want the column '2013' to remove ==> this is not ok

rubenmarin

Hi loic,

Maybe i don't undertad the full requirements, both examples in your last post is the normal behaviour of qlikview, don't need of set analysis:

=sum([Total N $(=maxstring(Unit))])

I'm missing something? can you upload a sample and what you expect?

Not applicable
Author

Yeah you're right man, i'm so bad today. ^^

I think i should better go sleep...

Thanks again