Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
Not applicable

Conditional Straight Table Dimension

I want to display dimensions in my straight table only if a selection was made for that dimension.

I'm not really sure if I can use GetCurrentSelection() for this.

I've tried using GetCurrentSelection() in a text object to see what it returns and it returns something like this:

Product: Potatoes

Size: Large

Would i be able to search that string for the dimensions name? and if i can how would i do that?

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Use the system field i.e $Field.

     This field will give you full list of field names.

     Then you can use just =$Field in textbox to get the selected field name.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

I've done  the following in the conditional show of the specific dimension/column:

GetCurrentSelection() Like '*Product*'

This show/hide the column, but the data in the straight table doesn't get effected.

What i'm trying to achieve is to get qlikview to group the data if that dimension is not visible, basically the same effect if i had to remove the dimension?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    

     Have a look at the application i had attached in below post.

     http://community.qlik.com/message/188771#188771

     This will solve your problem.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try using Calculated dimension

=If(GetSelectedCount(Product) > 0, Product, DefaultDimensionName )

The above Calculated Dimension expression checks whether any Product has been selected, if yes then Product is used as dimension otherwise uses the Default Dimension.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

@ Kaushik,

I couldn't open the app cuz i'm still using the personal edition but i did however managed to figure it out.

@ Jagan

This is the way i went. However I ended up doing this in the calculated dimension:

=if(GetCurrentSelection() Like '*Product*', Product)

Then I just added : GetCurrentSelection() Like '*Product*' in the conditional show for that dimension.

So when the calculated condition returns null if a Product is not selected, then the column doesn't show and it groups the rest of the data together cuz all the data will have a Null value for the Product field.

Thanks for the help to both of you though.