Skip to main content
Announcements
Join us on Feb.12 to Discover what’s possible with embedded analytics: REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakjp
Contributor
Contributor

Aggr Expression is not getting picked up in Pivot Table

I have a pivot table with 3 dimensions and a measure 

Picture1.jpg

Category and KPI are inline loaded and the table is pivoted by customer name.

In the measure, I have given a pick, match expression to pick up the corresponding expression for the KPI.

But when there is an AGGR expression, the value is not getting reflected in the table.

AGGR expression is working in case of Volume, which is the first row of the table. But for any other rows, it is not getting picked up.

I have only one aggr expression and I need to show it towards the middle of the table.

Please see the expression below,

pick(
match(SubCategory,
'Volume (m3)',
'ASP ($/m3)',
'Gross Revenue ($)',
'CM2 ($/m3)',
'Returned Concrete Margin ($)',
'Wait Time Margin ($)',

'Cancelled Orders (#)',

'Weighted Avg Delivery Time Slot',

),

Num(sum(quantity),'###,##0'),
Num(SUM(sales_net_value)/sum(quantity),'###,##0.00'),
Num(SUM(sales_net_value),'###,##0'),
Num(sum(CM2)/sum(quantity),'###,##0.00'),
Num(sum({<material={'GCONCRET'}>}sales_net_value) - sum({<material={'GCONCRET'}>}cost) - sum({<material={'GCONCRET'}>}freight_net_value),'###,##0'),
Num(sum({<level_6_description={'Waiting Time'}>}sales_net_value) - sum({<level_6_description={'Waiting Time'}>}cost) - sum({<level_6_description={'Waiting Time'}>}freight_net_value),'###,##0'),

Num(Sum(aggr(Avg(orders_cancelled),ship_to_info, Year,YearMonth)),'###,##0')

time(dt),

)

 

Please suggest if there is any workaround to make this work.

Labels (1)
1 Solution

Accepted Solutions
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

 

You can try to add SubCategory in the aggr

 

Num(Sum(aggr(Avg(orders_cancelled),ship_to_info, Year,YearMonth, SubCategory)),'###,##0')

 

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

2 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

 

You can try to add SubCategory in the aggr

 

Num(Sum(aggr(Avg(orders_cancelled),ship_to_info, Year,YearMonth, SubCategory)),'###,##0')

 

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
deepakjp
Contributor
Contributor
Author

Hi Aurélien,

This solves the issue.

Thank you so much for your help.