Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following expression:
sum(Aggr(
(SUM({<format= > }weight) / SUM(TOTAL{<format= > } weight))
*
(SUM( {<orderdate= {">=$(=max(obj_date_prod))"}, format=, flag_object={'1'}> } object_value) /100)
,Type,orderdate,format))
That gives me the following and it's OK, when I have selected Type = Product 1:
| Type | OrderDate | Format | Expression |
|---|---|---|---|
| 3,57% | |||
| Product 1 | 28/5/2018 | Stuff | 0,12% |
| Product 1 | 28/5/2018 | Mix | 3,45% |
But if I clear my selections for Type, then I see it like this:
| Type | OrderDate | Format | Expression |
|---|---|---|---|
| 17,63% | |||
| Product 1 | 28/5/2018 | Stuff | 4,51% |
| Product 1 | 28/5/2018 | Mix | 3,54% |
| Product 2 | 28/5/2018 | Other | 2,10% |
| Product 3 | 28/5/2018 | Other 2 | 1,50% |
| Product 4 | 28/5/2018 | Random | 3,80% |
| Product 5 | 28/5/2018 | Min | 2,18% |
Is there any way to keep the same value like in table 1 for all my Types?
Thank you!!!
might be you need to group your TOTAL type wise
try below
sum(Aggr(
(SUM({<format= > }weight) / SUM(TOTAL<Type> {<format= > } weight))
*
(SUM( {<orderdate= {">=$(=max(obj_date_prod))"}, format=, flag_object={'1'}> } object_value) /100)
,Type,orderdate,format))
Regards,
Would you be able to share a sample?
might be you need to group your TOTAL type wise
try below
sum(Aggr(
(SUM({<format= > }weight) / SUM(TOTAL<Type> {<format= > } weight))
*
(SUM( {<orderdate= {">=$(=max(obj_date_prod))"}, format=, flag_object={'1'}> } object_value) /100)
,Type,orderdate,format))
Regards,