Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

dhirajkumar
Contributor

Conditional expression or conditional dimension

Hi All,

Can someone explain  how we can make conditional expression or conditional dimensions in qlik sense . for example we have a table in which we are showing Product wise sales like in below table -

ProductSales qtySales amtgrowth
A100100$39%
B3420$45%
C370100$80%
D300250$90%
E400150$73%

and requirement is we have three button 'SalesQty', 'SalesAmt' and 'Growth' if we click on 'SalesQty' button then only product wise sales qty should be shown similarly for 'SalesAmt' and 'Growth' like in below table -

ProductSales qty
A100
B34
C370
D300
E400
4 Replies
miguelbraga
Valued Contributor III

Re: Conditional expression or conditional dimension

Add a Inline like this:

LOAD * INLINE [

Field

Sales qty

Sales amt

growth

];

Then Add a Table with this expression:

if(getfieldselections ( Field) = 'Sales qty', [Sales qty],

    if(getfieldselections ( Field) = 'Sales amt', [Sales amt],

        growth))

There you go

Regards,

MB

dhirajkumar
Contributor

Re: Conditional expression or conditional dimension

Hi Miguel,

Thanks for your quick response,

It will work but column label will not change dynamically , here requirement is column name also should be  change  according to on button clicking.

Thanks

miguelbraga
Valued Contributor III

Re: Conditional expression or conditional dimension

Hey there,

This feature isn't in the newest Qlik Sense version AFAIK. You can't dynamically label the field in a simple way.

What you can do is to label the column as just 'Selected Field' and the user will understand that the field that the column has the same field as he selected in the listbox 'Field'.

Hope this helps you

Regards,

MB

dhirajkumar
Contributor

Re: Conditional expression or conditional dimension

Hi Miguel,

Is there any extension  so that by using that extension we could achieve that things.

Regards

Dhiraj

Community Browser