Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulo_costa_ifp
Contributor II
Contributor II

Aggr applied to all data

I have a set of monthy agregated data like lines below:

Monthname    count(TransID)

jan/17         1000

feb/17           500

mar/17          700

apr/17          1500

may/17           350

jun/17           2000

The function below returns the "best" Monthname value:

max(aggr(count({<[trans_type]-={'OXY'}>}[TransID]),[Monthname]))   = 2000

If we filter jan/17 - mar/17, the function will return 1000. I would like to have a similar function, in order to get the best Monthname value from all data. In this way, if we filter jan/17 - mar/17, the function will return 2000.

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be this:

= max(TOTAL {<Monthname>} Aggr(count({1<[trans_type]-={'OXY'}>}[TransID]),[Monthname]))

View solution in original post

3 Replies
vishsaggi
Champion III
Champion III

May be this:

= max(TOTAL {<Monthname>} Aggr(count({1<[trans_type]-={'OXY'}>}[TransID]),[Monthname]))

antoniotiman
Master III
Master III

Hi Paulo,

try this

max({<Monthname=>} aggr(count({<[trans_type]-={'OXY'},Monthname=>}[TransID]),[Monthname])) 

Regards.

Antonio

paulo_costa_ifp
Contributor II
Contributor II
Author

It´snot running fine.