Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
surajap123
Contributor II

Limit dimension values using inline table

Hi All,

I am actually hardcoding the dimension values in the expression in my straight table to show only specific values(Eg-salespersons)

Dimension: salesperson

Expression:  =count({<salesperson={'*XYZ*','ABC*'}>}sales)

Instead, I want to create a inline table, so that power user can simply change the inline table eazily, whenever they want to change the salesperson to want to view.

I know how to create inline table, but not sure to which field i need to link this inline table.

1 Solution

Accepted Solutions
Highlighted
mov
Esteemed Contributor III

Re: Limit dimension values using inline table

There is no "from" for load inline.  It is

Island:

LOAD * INLINE [

     SP

     name1

     name2

     ...

];

That is, you have to type each name exactly.

View solution in original post

8 Replies
Highlighted
mov
Esteemed Contributor III

Re: Limit dimension values using inline table

You can create a copy of the salesperson field as a data island:

Island:
LOAD DISTINCT salesperson as SP RESIDENT ...;

And, use this SP on the front end as a filter.  Expression will be
=count({<salesperson=P(SP) >} sales)

Highlighted
MVP & Luminary
MVP & Luminary

Re: Limit dimension values using inline table

Is this different then just having them select SalesPerson (and locking) from a listbox? f you didn't want the selection to affect other charts, you could put the listbox in an alternate state.

-Rob

Highlighted
pradeepreddy
Valued Contributor II

Re: Limit dimension values using inline table


Hi Suraj,

If I understand the requirement in corecct manner, If the user selects the Salesperson from List Box, then its corresponding count should be evaluated.

Dimension : saleaperson

expression : count(Sales)

Highlighted
surajap123
Contributor II

Re: Limit dimension values using inline table

Hi Michael,

Thanks!!

Your script is pulling the complete salespersons.

How can i hardcode the salesperson names in Island table? As i need only specific salespersons from Salesperson field.

Highlighted
mov
Esteemed Contributor III

Re: Limit dimension values using inline table

If you want only a subset of the salespersons - it depends.  Do you have some rules, for example title of sales person?  If yes, it could be:

Island:

LOAD DISTINCT salesperson as SP RESIDENT ...

WHERE match(Title, 'Director', 'Manager', 'Sales Person');

If you don't have rules but want to hardcode, you can use inline load:

Island:

LOAD * INLINE [

     SP

     name1

     name2

     ...

];

In this case make sure the names are correct, it is easy to misspell.

Highlighted
surajap123
Contributor II

Re: Limit dimension values using inline table

Hi Michael,

Thanks a lot for your time..

Sorry to bother you again. I used both your scripts but getting syntax error..

I dont have any rules like title etc.

I just need specific salespersons from already exising table saleperson field in qlikview.

My script--

specificpersons:

LOAD DISTINCT salesperson as SP

RESIDENT qvtbl;

Island:

LOAD * INLINE [

     SP

     name1

     name2

from specificpersons;

I think the script is wrong somewhere. how can i create a inline table as the salespersons are coming from specificpersons table.

Highlighted
mov
Esteemed Contributor III

Re: Limit dimension values using inline table

There is no "from" for load inline.  It is

Island:

LOAD * INLINE [

     SP

     name1

     name2

     ...

];

That is, you have to type each name exactly.

View solution in original post

Highlighted
surajap123
Contributor II

Re: Limit dimension values using inline table

Hi Michael,

Thanks a lot for your patience..you have been very helpful !!