Discussion board where members can get started with Qlik Sense.
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"?
Go to Solution.
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:
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
You can add triggers on Year field to select the same year in the other two fields. the action would be Select in Field
This will help..
do you have a link to a help site about triggers? I don´t know what triggers are and can´t find anything.
you should link your calendar year with fiels year from table sales and table price :
somethink like that asuming you have year field named "Year" in your calendar :
"sales Year" as Year,
"prices year" as year,
then just add filter pan with field year and Year as dimension in your chart
hope it helps
my bad.... I didn't notice this was Qlik Sense. You will have to go with the other solutions provided as I don't think there are triggers in Qlik Sense as of now.
You could also concatenate your Sales and Prices into a single fact table during load with the column Year used for both. Use Set Analysis to identify the Prices Vs Sales in your measure.
do you have an example for it?
If i use this expression in the select field
='(' & priceYear & '|' & salesYear & ')'
2015 | 2014
2014 | 2016
And both years will and each linechart takes the correct year.
But how can i show only:
in the select field?
Try with this expression : = If(salesYear = priceYear, priceYear)
You will show this
And when you will select one value of this calculated field, the corresponding value in salesYear and priceYear will be selected