Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
YoussefBelloum
Champion
Champion

Forced selection of associated data

Hi Guys,

The app is attached below,

On a table i have a dimension and a cyclic group, the dimension change depending on the cyclic group change (with Getcurrentfield(cyclic_group) associated with a variable).

The problem is when I choose a dimension, all the associated data is selected, not just filtered..

screen1.png

screen2.png

Thank you

1 Solution

Accepted Solutions
Kushal_Chawda

sorry expression was wrong,.. use your original expression

View solution in original post

8 Replies
jelle_vervloess1
Contributor III
Contributor III

Hi youseff

i dont know why he selects the hic3 this should not happen as far as i know but you can force your measure to ignore the hic3 field by setting it to nothing in your set expression like so:

{<hic3=>}


i tried loading your qvw file but it didn't work

YoussefBelloum
Champion
Champion
Author

Hi,

I can't do that, because i need to use it when the cyclic group = Sous Groupement, which is HIC3..

Thanks anyway

YB

Kushal_Chawda

create variable vGroup and write below expression

=if(v_Group_lib='Groupement','HIC2',

if(v_Group_lib='Sous groupement', 'HIC3'

)

)

Now use vGroup variable as dimension in chart

see the attached

YoussefBelloum
Champion
Champion
Author

Hi Kushal,

it works on the first selection, but when i use the cyclic group to show the second dimension, the table is empty...

Something is missing i think

Thanks

Kushal_Chawda

sorry expression was wrong,.. use your original expression

YoussefBelloum
Champion
Champion
Author

Thanks, it works !

Can you tell me why with an IF it doesn't work ??

It looks like a Bug or something, can you confirm ??

Kushal_Chawda

yes. seems to be a bug only.

or functionality wise if you select the particular value from one dimension it aggregates the other dimension value included in if statement. This is similar to below expression

aggr(if(v_Group_lib='Groupement',HIC2,

if(v_Group_lib='Sous groupement', HIC3

)

),HIC2,HIC3)

To avoid  other dimension value to be selected, you can use below expression, but this work only for current cyclic group dimension if you change the cyclic group dimension, it will not work

aggr(if(v_Group_lib='Groupement',HIC2,

if(v_Group_lib='Sous groupement', HIC3

)

),HIC2)

YoussefBelloum
Champion
Champion
Author

I see..

Thanks a lot !