Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

One field selection should get two different values

Hi,

  1. i have a calender script and the field "Year".
  2. I have 2 linecharts. First "Sales", second "Price".
  3. The table for "Sales" has one column "salesYear".
  4. The table for "Price" has one column "priceYear".
  5. I want to put only 1 field into my worksheet to select a year.


How can i make it, that if i select a "Year", that the first linechart "Sales" get the year "salesYear" and the second linechart "Price" get "priceYear"?


regards,

Fritz



12 Replies
Anonymous
Not applicable
Author

Hi Fritz, would it make sense to create "Year" field in "Sales" and "Price" tables based on "SalesYear" and "PriceYear" respectively? That way the tables will be connected by "Year", and you still can display "SalesYear" and "PriceYear".

sfatoux72
Partner - Specialist
Partner - Specialist

It works in Qlik Sense too:

I add the field year in the expression of the calculated dimension YEAR :  = If(Year = salesYear and Year = priceYear and Year = Year,  Year)

When I select 2015 in the calculated dimension, The three other take automaticly the same value:

2016-02-07 16_51_51-Qlik Sense Desktop.png

But I agree with other, that it would be better to use only one field Year in your model. If it's not possible you have this solution

Anonymous
Not applicable
Author

Hi Sébastien,

thank you very much, this solution help me for my problem.

regards,

Fritz