Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!,
I have a doubt with Set Analysis and iI'm going crazy, I hope you can help me !!
I have a table like below:
Country | Model | 2017 | 2018 |
---|---|---|---|
España | V1 | 100 | 3 |
España | V2 | 28 | 45 |
España | V3 | 80 | 57 |
Francia | V1 | 45 | 68 |
Francia | V2 | 300 | 26 |
Francia | V3 | 25 | 4 |
I have Model, Year and country filters and I am trying to get a KPI using Set analysis writing a formula with dynamic filter to know the number of units in year (2017 or 2018) once I selected a country and a model in the filters. In the table are Spain, France but there are many other countries with the same models.
I've been trying with: sum ({$ <Model = {"??"}>} [2017]).
?? My problem is that I do not want to fix the model in the formula, what I want is that every time that I choose a model using the normal filters the formula takes it to recalculate the KPI, for example let's say that I choose Model VN1 and country Spain then my KPI immediately shows me 100 (obviously for this example year 2017 would be part of the formula)
It's possible?
Kind Regards, and thank you very much
Fernando
Are you saying that you only wish to see the KPI when Model and Country are selected?
Hello Sunny,
actually I see the KPI always but the value of this KPI changes when I select a different Model or Country. I mean, if I select Francia and V2 then the KPI should show 300.
I´m pretty sure that my formula is wrong sum ({$ <Model = {"??"}>} [2017]).
I wrote ?? because I don't know what i should write within the parentheses
Thank you in advance
If you need the see the output based on your selection, then why do you need anything in set analysis? QlikView is associative and your selection will automatically be captured by the expression. Just using Sum(2017) should be enough. Have you tried that already?
hello Sunny,
the the point is, that when ido just Sum(2017) then capture the values from v1, v2, and v3 at the same time, for my example that would be 208 (españa) instead 100.
thank yo again!!!
But why show 100 if you have not selected anything? why not 208 or 28 or 80? You would want to show v1 when nothing is selected in Model? May be try this
If(GetSelectedCount(Model) = 0, Sum({<Model = {'V1'}>} 2017), Sum(2017))