Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Variable dimensions

This must be easy I hope: I've create a variable vCritDimension which content is:

=If(GetSelectedCount(Dimension)>0,CONCAT(DISTINCT Dimension,  ', '))

Where Dimension is a result of:

LOAD * INLINE [

Dimension

'Cliente NIF'

'Articulo'

];

I have a list Dimension and use the selected values to show or hide dimensions with the next condition, and it works:

=GetSelectedCount(Dimension)>0 and  SubStringCount( GetFieldSelections(Dimension), 'Cliente NIF')>=1

But when I use vCritDimension in an Aggr function it's not understood as dimensions... Do I miss something with $ or whatever??

12 Replies
Anonymous
Not applicable
Author

It drives me crazy... .It works in the attached .qvw but when I change it in mine .qvw, it doesn't...  There are only three dimensions, but two to choose... I understand that you only have changed vCritDimension for:

=If(GetSelectedCount(Dimension)>0, '[' & Concat (DISTINCT Dimension,  ' ') & ']')

sunny_talwar

Also, created a new field in the script

LOAD Origen,

    Articulo,

    [Cliente NIF],

    [Grupo Cliente],

    Articulo&[Cliente NIF] as [Articulo Cliente NIF],

    Y,

    M,

    D,

    [Venta Neta]

FROM

(ooxml, embedded labels);

LOAD * INLINE [

Dimension

'Cliente NIF'

'Articulo'

];

Anonymous
Not applicable
Author

Perfect!!! Thanks a lot, Sunny!