Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the following I want to replace the expression FORT_BENENNUNG= with a variable.
=count({<FORT_BENENNUNG=>} distinct FGN_AV)
I defined the variable in an input box as:
vFORT_BENENNUNG) = FORT_BENENNUNG=
I cannot bring the expression with the variable to work
=count({<$(vFORT_BENENNUNG)>} distinct FGN_Fahrzeug) result 0
=count({<$(=vFORT_BENENNUNG)>} distinct FGN_AV): this ignores the set analysis
=count({<{$("vFORT_BENENNUNG)"}>} distinct FGN_AV) : no result ( -)
and other different expressions, which all did not work.
i would be happy if i could get a solutiom. Thank you in advance.
(The variable in my application is much more complex, the example posted here is simplified)
Only to clarify - the variable-definition must not start with the equal-sign, only:
variable vFORT_BENENNUNG:
FORT_BENENNUNG=
and then I see that there is a space behind your variable and the bracket:
$(vFORT_BENENNUNG )
- Marcus
Hello,
To define the variable in the script:
vFORT_BENENNUNG = " FORT_BENENNUNG =" ;
and the set of analysis :
=count({<$(vFORT_BENENNUNG )>} distinct FGN_AV)
Good Luck with QV!
This syntax: =count({<$(vFORT_BENENNUNG)>} distinct FGN_Fahrzeug) looked right. Are you sure that the result must be different to 0? How is the variable defined and how looked they within a textbox?
If you you used such expression within a table-chart and you set no label you could see within the label (per mouseover) how qlik interpreted the the expression-parts.
- Marcus
Thank you for your answer.
Unfortunately I don't have the possibility to make changes in the script.
I have to define the variable in an Input box.
vFORT_BENENNUNG = " FORT_BENENNUNG =" in the input box doesn't work
=count({<$(vFORT_BENENNUNG )>} distinct FGN_AV): result =0
The expression:
=count({<FORT_BENENNUNG=>} distinct FGN_AV)
gives the right result (the result is independent from the filtering in field FORT_BENENNUNG)
Thank you for your answer.
I defined the variable in an input box as:
vFORT_BENENNUNG = FORT_BENENNUNG=
=count({<$(vFORT_BENENNUNG )>} distinct FGN_AV)
should bring the same result as
count({<FORT_BENENNUNG=>} distinct FGN_AV)
but does not.
Hello,
This is what you need?
Only to clarify - the variable-definition must not start with the equal-sign, only:
variable vFORT_BENENNUNG:
FORT_BENENNUNG=
and then I see that there is a space behind your variable and the bracket:
$(vFORT_BENENNUNG )
- Marcus
Thank you very much for your help. After eliminating the space in the bracket and correcting the variable as you showed me, the expression works correctly.
Hello
My problem was solved by Marcus Sommer.
Thanks to you also for your efforts and answer.