Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have a requirement wherein I have to create a Hardcoded filter like below:
ValueList('A','B','C')
And as per the value selected by user in the above filter I have to modify the data of a particular table (not the overall application).
Please suggest if there's any way of doing this.
Qliksense Version: QS Desktop June
Regards,
Tauceef
A ValueList() is not a field, and it only has any meaning inside the object in which it is defined. So you can reference the ValueList from a dimension in an expression in the same object, but there is no way to select a value or to retrieve the selected value from another object, a macro or the load script.
It sounds like you need an island table - one that is not associated with any other table. Something like
ValueIsland:
LOAD * Inline
[
island_Value
A
B
C
];
Now use the fields island_Value instead of the ValueList()
Try something like this:
if(ValueList('A','B','C')='A', formula A',
if(ValueList('A','B','C'))='B', formula B', formula C'))
Hi Jaume,
Thanks for your response.
I tried this code but it is not working for me. As mentioned earlier we have created the hardcoded filter which is not linked with my data anywhere.
Is there a way we can get the selected value of a particular filter in sense? so that will use it in my formula to do the calculations.
I found one function "GetFieldSelections(dimention)" but this will not work in my case as I have created this filter using Listvalue() function.
Looking forward for a work around.
Edited:
Just found one more thing, which is bad again.
I have created the filter using Valuelist() function but when I select anything, no filter is getting applied.
Now I think I have to start asking from one step backword:
1. how to create a hardcoded filter with some values.
2. how we can use this filter in any chart or table to filter data.
Regards,
Tauceef
A ValueList() is not a field, and it only has any meaning inside the object in which it is defined. So you can reference the ValueList from a dimension in an expression in the same object, but there is no way to select a value or to retrieve the selected value from another object, a macro or the load script.
It sounds like you need an island table - one that is not associated with any other table. Something like
ValueIsland:
LOAD * Inline
[
island_Value
A
B
C
];
Now use the fields island_Value instead of the ValueList()
Thanks Jonathan, it works perfectly for me.
Regards,
Tauceef