Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
poluvidyasagar
Creator II
Creator II

Max of the count ?

Hi All,

I am trying to achieve the following:

 

AreaSub AreaDateCount
AA16/4/201810
AA26/5/201815
AA16/6/201820
AA26/7/201830
BB16/4/201810
BB26/5/201835
BB16/6/201850
BB26/7/201820

 

Here is my data set and i want to get max of count for each sub area under each area:

my result should look like this:

 

AreaSub AreaMax
AA120
AA230
BB235
BB150

What is the best expression to achieve this?

My dimensions are Area, SubArea

My Measure is Max(Count)

Thanks,
Vidya

6 Replies
shiveshsingh
Master
Master

May be this

if(rank(sum(Count1))=1,sum(Count1))

Capture.JPG

agomes1971
Specialist II
Specialist II

INPUT:

LOAD Area,

     [Sub Area],

     Date,

     Count

FROM

(ooxml, embedded labels, table is Sheet2);

OUTPUT:

LOAD Area, [Sub Area], Max(Count)

Resident INPUT

group by Area, [Sub Area];

DROP Table INPUT;

Anil_Babu_Samineni

Not sure, You already got the answer? Aren't you?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
poluvidyasagar
Creator II
Creator II
Author

I would like to write this as one single expression. I do not want to write a load script.

sasiparupudi1
Master III
Master III

May be try FirstSortedValue(Count, -Date)

jyothish8807
Master II
Master II

You can try like this:

Dim: Area Sub Area

Exp: aggr(max(Count),Area,SubArea)

Br,

KC

Best Regards,
KC