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

using dimension's field on expressions of set_analysis

with set_analisys i realized a simple table with one dimension "Month" and two expressions:

Year Sales: sum ($ {} <Year= {$(=Only(Year) )}> Sales)

Year Sales-1: sum ($ {<Year= {$(=Only(Year) -1} )}> Sales)

gives the following result:

| Month | Year Sales | Sales Year-1
| Jan     | 10             | 5
| Feb     | 8              | 11

and so on ...



If I now add the dimension "Year", I no longer have the result I expected: divides the values ​​in the respective years (rightly )..... and I do not know how to get out ....

Year | Month | Year Sales | Sales Year-1
2010 | Jan |                   0 |         5
2010 | Feb |                  0 |        11
2011 | Jan |                 10 |          0
2011 | Feb |                  8 |          0

thanks in advance to those who want to help me!

2 Replies
Not applicable
Author

Since sales year -1, is for the year 2010, it will come on the chart. This is behavaiour of Qlikview. Only way is to remove Year dimension. Just pondering on the reason you have Year dimension if only one value is active.

If business requirement asks you show year, I recommened using =Only(Year) in Caption title.

Kiran.

Not applicable
Author

Hello

I Recommened using

YEAR={$(=Max(YEAR)-1)}>}

and

YEAR={$(=Max(YEAR))}>}