Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to get list of dimension values from only related source.
When select any of value others should be visible as well but only from related source.
Data:
LOAD * Inline [
Dimensions, Source
Dim1, Source1
Dim2, Source1
Dim3, Source1
Dim4, Source1
Dim1, Source2
Dim2, Source2
Dim3, Source2
Dim4, Source2
];
Aggr(Only({<Source=P(Source)>} Dimensions), Dimensions)
Case
1. Select Source1
2. Select Dim2
As the result I need Dim2 selected as well as available(grey) all other Dimensions from only Source1.
Any help would be much appreciated!
Max
It seems to be working for me
When I select Dim1, I still see all Dimensions because Dim1 has Source1 and Source2 and one of those are part of Dim1, Dim2, Dim3, and Dim4
Now, within the list boxes, I continue to see all, but Dim2, Dim3, and Dim4 are greyed out... but that is because they are not selected and QlikView's Associative properties won't allow you to do that. The way to break that would be to either use Alternate State or use island table in your dashboard.
If you select (with an action for example) the value in the field Source, the associated values will turn white, and the excluded values will turn grey.
The Aggr() or If() functions will return only those values with match the condition, the others will not display as excluded because the function already excluded them.
May be try this
Aggr(Only({1<Source=P(Source)>} Dimensions), Dimensions)
or
Aggr(Only({<Source=P(Source), Dim>} Dimensions), Dimensions)
Thank you Sunny for suggestion. I have already tried to use 1 as Identifier but without success result.
When you mentioned Dim does it mean Dimensions field?
Unfortunately this is not working as to show all other fields when something already selected.
Miguel is right that Aggr() function returns only values which match the condition.
But I cannot use simple behavior when all not selected values are grey. I need to show only related to particular source and hide all others.
Sunny, Miguel,
Do you have any idea?
When you mentioned Dim does it mean Dimensions field?
Yes, this is what I meant.
Unfortunately this is not working as to show all other fields when something already selected.
Where exactly are you using this? In a chart or filter/list box object for selection?
Hi Sunny, I am trying to use this logic in a list box but it is not working in a straight table as well.
I cannot believe there is no way to make this logic successful.
Does anyone can help on this?
Sorry to not respond earlier... I thought it would sort of work in both, but the only thing is that you will see the not selected items to be greyed out. Let me create a sample to see what might be not working here
It seems to be working for me
When I select Dim1, I still see all Dimensions because Dim1 has Source1 and Source2 and one of those are part of Dim1, Dim2, Dim3, and Dim4
Now, within the list boxes, I continue to see all, but Dim2, Dim3, and Dim4 are greyed out... but that is because they are not selected and QlikView's Associative properties won't allow you to do that. The way to break that would be to either use Alternate State or use island table in your dashboard.
I cannot believe my eyes it's working properly!
Probably I was tired that day so couldn't realize it.
Much appreciated Sunny.