Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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'.
am not sure,
is there any effect on performance ?
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
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
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.