Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to get count of Test
if I select ID in my list box all the Test should be counted for selected ID's in Listbox and count should be store into a variable .
RCYC:
load * Inline [
ID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
];
Test:
load * Inline [
Test,ID
1,1
2,1
3,1
4,1
5,2
6,2
7,2
8,3
9,3
10,4
];
For more information sample app is attached.
Thanks
BKC
Hi,
You can use GetFieldSelections() function but you need to specify the third parameter which is optional. You need something like this:
=GetFieldSelections(ID, ',',1000)
Where 1000 values is the limit.
I wouldn't use Concat() because if there's nothing selecting then Concat() would return all the values. To tackle this issue you need a conditional statement (IF) which might be inefficient.
Hope this helps!
Cheers,
DV
www.QlikShare.com
From what I understand, try defining you variable using Concat function instead of GetFieldSelections. May be like this:
=Concat(DISTINCT ID, ',')
Attaching your qvw for reference
Best,
Sunny
Hi,
You can use GetFieldSelections() function but you need to specify the third parameter which is optional. You need something like this:
=GetFieldSelections(ID, ',',1000)
Where 1000 values is the limit.
I wouldn't use Concat() because if there's nothing selecting then Concat() would return all the values. To tackle this issue you need a conditional statement (IF) which might be inefficient.
Hope this helps!
Cheers,
DV
www.QlikShare.com
instead of GetFieldSelections u can use this
=if(GetSelectedCount(ID)>0, Concat(ID,','))
Thank you
It will give me some Idea.
hi
Are you looking for this?
Create a variable named something like "vTestCount"
And add expression like = If(GetselectedCount(ID), Count(Test), 0)
// If user select ID field, then vTestCount counts the Test value else 0 is store for that variable
BKC - In case you're interested in understanding Meta Data functions, you can check the following video:
Cheers,
DV
Can you use ?
Count({$} Test )