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

Issue with Monthly& Weekly avg

Hello,

   I am calculating monthly avg in combo chart, Issue is here when there is no month selection the chart is plotting Sep and Oct only but its not plotting Nov and Dec, If we select Nov and Dec from Month filter then i can see the bars. I am not sure is something wrong with my expression so looking for some help here. Please find the attached sample file.

1 Solution

Accepted Solutions
sunny_talwar

Try adding the dimensions within the Aggr() function

=if(only(Vehicle_Use) = 'LEASE',

Round(Avg(Aggr(count({<Vehicle_Use-={''},Unit_type-={''},Current_Cust_Number ={'699999','699998'},Rental_Source_Type ={'COMMERCIAL'}, Veh_Cap_Status-={''}>}RENTED_UNITS),Day, MonthName))),

Round(Avg(Aggr(count({<Vehicle_Use-={''},Unit_type-={''},Rental_Source_Type ={'COMMERCIAL'},Veh_Cap_Status-={''}>}RENTED_UNITS),Day, MonthName))))


Capture.PNG

For week, create a weekstart in the script and add that to aggr function also

View solution in original post

2 Replies
sunny_talwar

Try adding the dimensions within the Aggr() function

=if(only(Vehicle_Use) = 'LEASE',

Round(Avg(Aggr(count({<Vehicle_Use-={''},Unit_type-={''},Current_Cust_Number ={'699999','699998'},Rental_Source_Type ={'COMMERCIAL'}, Veh_Cap_Status-={''}>}RENTED_UNITS),Day, MonthName))),

Round(Avg(Aggr(count({<Vehicle_Use-={''},Unit_type-={''},Rental_Source_Type ={'COMMERCIAL'},Veh_Cap_Status-={''}>}RENTED_UNITS),Day, MonthName))))


Capture.PNG

For week, create a weekstart in the script and add that to aggr function also

AC
Contributor II
Contributor II
Author

I figured it out Sunny anyway thank you!!