Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The user wants to compare revenue growth for two years.
Suppose a user selects 2 values of field YEAR. I need the sum of VALUES for min(YEAR) in a column and the sum of VALUES for max(YEAR) in a second column so I can compute the growth between the 2 selected years.
I was trying (using set analysis) this:
sum({<YEAR = {"$(=min(YEAR))"} VALUE)
and
sum({<YEAR = {"$(=max(YEAR))"} VALUE)
But this does not work. Any suggestions?
Thanks in advance!
You missed the closing set analysis syntax (>})
These are working now:
=Sum({<Year = {"$(=Min(Year))"}>} Revenue)
=Sum({<Year = {"$(=Max(Year))"}>} Revenue)
I don't see a reason for this not working.... Can you share a sample or snapshot to show what exactly do you get and explain as to what you are looking to get?
Hi Sunny,
I don't know how to upload my sample qvw, so here some screenshots.
Look here to see how a sample can be uploaded
I think you are using two variation of Year (Year and YEAR).... QlikView is case sensitive and you need to make sure you are using the correct casing...
Sum({<Year = {"$(=min(Year))"} VALUE)
or
Sum({<YEAR = {"$(=min(YEAR))"} VALUE)
I uploaded a sample app to explain my problem.
You missed the closing set analysis syntax (>})
These are working now:
=Sum({<Year = {"$(=Min(Year))"}>} Revenue)
=Sum({<Year = {"$(=Max(Year))"}>} Revenue)
Thanks!