Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table like below:
User | Role |
---|---|
Gavin | Audit |
Tim | Audit |
Harps | Audit |
Gavin | Purchasing |
Tim | Purchasing |
Tim | Purchasing |
Dean | Audit |
Harps | Audit |
I want to display in a text box the number of Users who have more than one role. e.g. 2
I've been playing around with the aggr function and can't seem to get it to work (never used aggr before).
Cheers,
Dean
=sum(if( aggr(count(distinct Role),User)>1, 1,0))
In your list box expression, use below
=IF(AGGR(COUNT(Role),User)>=2,User)
or
=IF(AGGR(COUNT(Distinct Role),User)>=2,User)
UPDATE : Please check enclosed file.
In your list box at the end of fields list there is "Expression" voice, select it and write
=if(Aggr(count(DISTINCT Role),User)>1, User, Null())
Thanks,
Sorry, I ment text box.
You can use this as expression for the the text box: =count({<User={'=count(distinct Role)>1'}>}distinct User)
thanks,
Sorry I ment text box. Although that is very useful.
=sum(if( aggr(count(distinct Role),User)>1, 1,0))
=Concat({<User = {"=COUNT(Distinct Role)>=2"}>}Distinct User,', ')
=Concat({<User = {"=COUNT(Distinct Role)>=2"}>}Distinct User,', ')