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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sum month constant

Hello Community,

I'd like to share this problem with you: I have a bar chart where X axis is month and where there is only an expression which has the following form:

2571+(66/4)*(subfield(num(month)/3,',',1) ).

And it work perfectly, but I would like to visualize all months <= month selected, so I tought I should use a set analysis like that Sum({<month={"<=$(=max(month))"}>} ... ) but it didn't work ... why? I even tried just sum({<month={"<=$(=max(month))"}>} 1) but values were so strange...Can you help me find a solution?

Thank You

IB

2 Replies
MK_QSL
MVP
MVP

Dimension ....

use below as a calculated dimension instead of month as dimension...

=IF(Month<=Month(Today()),Month)   

You can use your desired month instead of Month(Today())

Tick Suppress When Value is NULL

Expression

Same as you have used above...

Anonymous
Not applicable
Author

Ok, thank U Manish. I found out where the problem was: I have to admit that the situation I illustrated it was placed in a wider scenario, where month was loaded more than once, so what happened was that the constant values I introduced were counted as many times as each month was loaded... so the so-called "strange values" appeared! Then I paid attention to that fact and I introduced DISTINCT in my sum... and now everything works perfectly!

Thank U again

Greetings

IB