Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

aggr functionality to return a subset of results

I'm creating a table for my dashboard and only want to display BINS that are present and have someone in them. I did an aggr function and it's not working.  what am I doing wrong?

aggr(distinct {$<BINPresent = {1}>} {$<BINUnmapped={0}>}, BIN)

I understood this to return only the distinct BINS that have a binpresent of 1 and a binunmapped of 0.  am I using aggr incorrectly?  how can I return the BINs that I'm looking for?

3 Replies
sunny_talwar

May be you need this (if you are using this as a dimension)

If(BINPresent = 1 and BINUnmapped = 0, Bin)

ogster1974
Partner - Master II
Partner - Master II

AGGR Function is there to group on a value not filter it.

COUNT(distinct {$<BINPresent = {1}, BINUnmapped={0}>} BIN) Would count the number of BIN that meat thats condition.

AGGR(COUNT(Distinct BIN), BINUnmapped) would return the number of BIN for each grouping of  BINUnmapped

I have this document on SET Analysis which is a really good reference guide,

Hope this helps

Andy

sasiparupudi1
Master III
Master III

Think Aggr as SQL Group By

Select

Count(BINS),

Store,

Rack,

Pallet

From MyTable

Group By Store,Rack,Pallet

Where BINPresent=1 and BINUnmapped=0

Set Analysis Count with Where Conditions

Count(

{<

BINPresent={1},

BINUnmapped={0}

>}

BIN)

Group by are the selected dimensions in the chart. Hth