Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

simple and smart ?

Hi Folks,

I have  data like this

load * inline [

prodcuts,sales,cardgroup

producta,100,cardA

productb,200,cardB

];

here the point I will create a chart with

products as dim

sum(sales) as expression

here I am expecting the thing is

I should have new field called Group

where  Group should have data

Group

All

cardA

cardB

if user select on All from Group columns   it should show me the data for both  Producta and Productb

if he select on cardA  then only product ... like wise other one

how to achieve this expect below way

t1:

load

products,

sales,

cardgroup,

cardgroup as Group

...... from qvd1

concatenate

t1:

load

products,

sales,

cardgroup,

'All' as Group

...... from qvd1

the above solution is working ,but I don't want the same table again for getting the all filter

14 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

It is not necessary to load the table data twice - that is total overkill and complicates the front end expressions. Rather do this after the main table load:

t2:

LOAD FieldValue('cardgroup', RowNo()) as cardgroup,

  'All' as Group

Autogenerate FieldValueCount('cardgroup')

Concatenate(t2)

LOAD FieldValue('cardgroup', RowNo()) as cardgroup,

  cardgroup as Group

Autogenerate FieldValueCount('cardgroup')

Group will now link cardA too itself and to 'All'.

But a better way is not do that at all. Just train your users that no selection is the same as 'All'.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

am not sure,

is there any effect on performance ?

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi,

Its is not required to load twice the same table as per script,

Instead of taking two time same table,

Step 1 : Load the QVD .

Step 2: Take resident of above table (It will take less time as compared to actual load).

//Ur Script:

t1:

load

products,

sales,

cardgroup,

cardgroup as Group

...... from qvd1

concatenate

t1:

load

products,

sales,

cardgroup,

'All' as Group

...... from qvd1

My script:

Data:

load

products,

sales,

cardgroup,

cardgroup as Group

...... from qvd1

concatenate

t1:

load

products,

sales,

cardgroup,

'All' as Group

Resident Data ;

I hope this may helps you.

Regards,

Nagarjun

MayilVahanan

Hi

Try like this

Prod:

load * inline [

prodcuts,sales,cardgroup

producta,100,cardA

productb,200,cardB

];

T:

load Distinct cardgroup, cardgroup as Group Resident Prod;

Concatenate

LOAD 'All' As Group, cardgroup Resident T;

It does not load all the fields again and also load only distinct cardGroup from ur table. so that, its doesn't occupy memory that much.

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Colin-Albert

There is no need for the All group.

In QlikView if you select nothing in a listbox, that is effectively the same as selecting all values.

Just have a list box with CardA and CardB.

Selecting one of the cards will filter on that data, selecting neither will show all data.

Green, White & Grey the fundamentals of selection in QlikView.

Qlik Tips: Raise a flag to the Green, White and Gray