Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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?
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
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.
@ 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.