Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Create listbox based on calculations

Hello,

Is it possible to create a listbox based on measures(expressions) in  a graph

Lets say

I have sum(sales) and sum(budget) in a graph.

Can i then make a listbox, where i can select Sum(sales) and sum(budget)

So when i select these, only the one i select will be shown in my graph....

1 Solution

Accepted Solutions

Re: Create listbox based on calculations

Hi Thomas,

     Create a inline table with two fields for example.

     Expression:

     Load * inline [

     Expression

     Sales

     Budget

     ];

     Use this field as filter.

     Then in chart expression use the "Conditional" option, where you can write the logic to show the Sum(Sales) when Sales is selected in Expression field and so on.

     Hope the logic is clear.

Regards,

Kaushik Solanki

9 Replies

Re: Create listbox based on calculations

Hi Thomas,

     Create a inline table with two fields for example.

     Expression:

     Load * inline [

     Expression

     Sales

     Budget

     ];

     Use this field as filter.

     Then in chart expression use the "Conditional" option, where you can write the logic to show the Sum(Sales) when Sales is selected in Expression field and so on.

     Hope the logic is clear.

Regards,

Kaushik Solanki

Not applicable

Re: Create listbox based on calculations

I Follow you.

But what would you write in your conditional?

How do you in your conditional refer to Sales under Expression??

Not applicable

Re: Create listbox based on calculations

something like this:

WildMatch(Concat(Expression, ' / '), 'Sales') ?

Re: Create listbox based on calculations

Hi,

     Say for example.

    

     Your conditional Expresison will be (for Sales expression)

     =if(wildmatch(GetFieldSelections(Expression),'Sales'),1,0)

     and for Budget it will be

     =if(wildmatch(GetFieldSelections(Expression),'Budget'),1,0)

Regards,

Kaushik Solanki

Not applicable

Re: Create listbox based on calculations

If i use wildmatch do i have to write the whole name? or is there something like in SQL where you can use % so i dont have to write the whole name..

Lets say if i write 'Sal' instead of Sales do i then need some kind of prefix?

Re: Create listbox based on calculations

Hi,

     Yes wildmatch is same like 'LIKE' in sql.

     With wildmatch function you can use the '*' same like '%' in like function.

     You need to write 'Sal*' for sales.

Regards,

Kaushik Solanki

Not applicable

Re: Create listbox based on calculations

btw. one last questions. If i do this, i can only select one at the time. What if i want to select two? then it says All expressions disabled!

Re: Create listbox based on calculations

Hi,

     Try *Sal* in wildmatch.

Regards,

Kaushik Solanki

Not applicable

Re: Create listbox based on calculations

Cheers!

Community Browser