Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
maxsheva
Creator II
Creator II

list of dimension values from only related source

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

1 Solution

Accepted Solutions
sunny_talwar

It seems to be working for me

Capture.PNG

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.

View solution in original post

9 Replies
Miguel_Angel_Baeyens

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.

sunny_talwar

May be try this

Aggr(Only({1<Source=P(Source)>} Dimensions), Dimensions)

or

Aggr(Only({<Source=P(Source), Dim>} Dimensions), Dimensions)

maxsheva
Creator II
Creator II
Author

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?

sunny_talwar

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?

maxsheva
Creator II
Creator II
Author

Hi Sunny, I am trying to use this logic in a list box but it is not working in a straight table as well.

maxsheva
Creator II
Creator II
Author

I cannot believe there is no way to make this logic successful.

Does anyone can help on this?

sunny_talwar

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

sunny_talwar

It seems to be working for me

Capture.PNG

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.

maxsheva
Creator II
Creator II
Author

I cannot believe my eyes it's working properly!

Probably I was tired that day so couldn't realize it.

Much appreciated Sunny.