Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
RobinTMavhu
Contributor III
Contributor III

Highest Aggregated Total

Hello Experts. i have attached a dataset showing hourly connections per station per cell. i am failing to come up with the expression that highest sum of connected users per station per hour. Say a station called Mafeking has 3 cells, i want to add the connected users in each cell per hour and then of those aggregated values take the highest or maximum.

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

@RobinTMavhu  create a table with dimension Station and below expression

max connected users in any hour:

max(aggr(Sum(ConnectedUsers),Substation,Hour))

Hour with max connected users:

= FirstSortedValue(distinct Hour, -aggr(Sum(ConnectedUsers),Substation,Hour))

View solution in original post

6 Replies
Kushal_Chawda

@RobinTMavhu  What is expected output? How you want to represent it?

RobinTMavhu
Contributor III
Contributor III
Author

Various visualizations i.e. KPIs, Tables, Bar graphs, Line graphs. e.g. Table with columns for Station and Highest Connected Users during an hour

Kushal_Chawda

@RobinTMavhu  So for each station you want to show busiest hour? Meaning highest connected users for specific hour. for eg. one station have 20 users in hour 17, and 40 users in hour 18, so you want to show 40 and hour 18 for that station?

RobinTMavhu
Contributor III
Contributor III
Author

Yes. So each station has a number of Cells. So for each hour add the connected per cell per station and then show total for the hour with highest number of connected users.

Kushal_Chawda

@RobinTMavhu  create a table with dimension Station and below expression

max connected users in any hour:

max(aggr(Sum(ConnectedUsers),Substation,Hour))

Hour with max connected users:

= FirstSortedValue(distinct Hour, -aggr(Sum(ConnectedUsers),Substation,Hour))

RobinTMavhu
Contributor III
Contributor III
Author

Thank you Kushal, this is correct!!