Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My data set is this:
ID | Gender |
---|---|
1 | Female |
2 | Male |
3 | Female |
4 | Male |
5 | Female |
6 | Male |
7 | Female |
8 | Male |
9 | Female |
10 | Male |
I have a listbox and two text box:
Tex box has these expressions:
='Female: '&count( {$<Gender={'Female'}>} ID)
='Male: '&count( {$<Gender={'Male'}>} ID)
I am wondering If anybody knows why set analysis doesn't work here: If I choose Female in the list box it still shows 5 Male in the text box. I know I can achieve correct count with getselectedcount function, but what to do If I want to use set analysis and that it would take into account all the selections? I though $ symbol should do the trick, but id doesn't in this case.
Please also see the app attached.
Try this
='Female: '&count( {$<Gender *= {'Female'}>} ID)
='Male: '&count( {$<Gender *= {'Male'}>} ID)
Hi,
what are you trying to do ?
when you choose Female, you want the text box "Male" shows 0 ?
Try this
='Female: '&count( {$<Gender *= {'Female'}>} ID)
='Male: '&count( {$<Gender *= {'Male'}>} ID)
May be try these
='Female: '&count( {< Gender = {"=GetFieldSelections(Gender) = 'Female' "} >} ID)
='Male: '&count( {< Gender = {"=GetFieldSelections(Gender) = 'Male' "} >} ID)
Hi Vytautas,
The set expression {$<Gender={'Male'}>} tells the aggregation function it is used in to disregard user selections for Gender and instead return the result as if 'Male' had been selected. The whole idea of set analysis is to allow expressions be be calculated over records that are not restricted solely to user selections in the document. For your purposes try Sum(DISTINCT if(Gender = 'Male',ID)).
Regards
Andrew
='Female: '&if(GetFieldSelections(Gender)='Female', count( {$<Gender={'Female'}>} ID),0)
='Male: '&if(GetFieldSelections(Gender)='Male', count( {$<Gender={'Male'}>} ID),0)
Try this..
Regards,
Mohammad
Hi Sunny,
first time i see this.. can you explain the meaning of the STAR here ?
Thanks
YB
Check here
Very nice post, thank you !
As always, amazing, Thanks!