Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sreeramhbk
Contributor III
Contributor III

Selecting multiple dimensions of same value

Hi,

I have the following requirement,

The user should see the data according to selections. The Filter should be "Bi-Yearly" and the next filters should be "1st year" and "2nd Year" and the table should reflect data of the two years which have been filtered. Here as I use the year as same dimension in both 1st and 2nd year filters, it takes the same value. If I use alternate state, the data becomes zero. If I use create another dimension/column as year, Qlik still consider it as same dimension. If I create another column from different table it's not associating. Is there any possibility to do this.? Please find the below image for the requirement.

Bi-Yearly.PNG

1 Solution

Accepted Solutions
mcsshg2011
Contributor III
Contributor III

Hi, 

 

Attached sample apps as requested.

View solution in original post

9 Replies
Channa
Specialist III
Specialist III

hi you need to add two columns for your year

 

Like current year, previous year

2013,2012

2014,2013

2015,2014

Channa
sreeramhbk
Contributor III
Contributor III
Author

Hi Channa,

Thanks for your reply.

I don't want it as a current year and previous year. Both filters should have all the year values which is applicable in the table. The user should be able to select any years and the table should reflect the value.

Many thanks.

 

Vegar
MVP
MVP

You could do this using alternate states. You need to adjust your expression with a set like this.
{<Year=State2::Year >}

An alternative solution is to instruct the user to select multiple values in the same field, then do the comparison between the max(Year) and the min(Year).
sreeramhbk
Contributor III
Contributor III
Author

Thanks vegar for your response.

The idea you suggested is not working either. When I adjust my expression, the values in the table goes to zero.

Many thanks.
Channa
Specialist III
Specialist III

try to use Operator OR

create 2 variables

1.year1

2.year2

expresion

 

sum({<Firstyear={=$(year1)} or secondyear={=$(year2)} value)

 

 

Channa
mcsshg2011
Contributor III
Contributor III

Hi, 

There could be 2 options.

(a) Load 2 orphan Year data (Year 1) and (Year 2), that does not link to any of your dimension and fact tables. Your filter pane will be from the Year 1 and Year 2 table. Then in your chart, you can include in your formula where the Fact Year = to the Years selected for Year 1 and Year 2.  You may consider using variables to identify value selected and use in your formula.

OR

(b) Only have 1 Year filter pane. However, you can choose to only pick up Minimum Year and Maximum Year selected by users.  With this option, you rely on users to rightfully only choose 2 years.

 

sreeramhbk
Contributor III
Contributor III
Author

Hi,

Could you please share the sample app.? I loaded the tables but unable to call the value in the variable. Please assist.

Many thanks.

 

mcsshg2011
Contributor III
Contributor III

Hi, 

 

Attached sample apps as requested.

sreeramhbk
Contributor III
Contributor III
Author

Many thanks on your assistance. Working perfectly.