Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I wish to calculate the Total by Part as below by using below expression, but it not allow to me filter any dimension.
Company Name | Part No | Qty | Total By Part |
A | 1 | 100 | 100 |
B | 2 | 20 | 30 |
C | 3 | 30 | 70 |
A | 2 | 10 | 30 |
C | 3 | 40 | 70 |
SUM({1}TOTAL <Part No>Qty)
Thanks for advice.
Steve
maybe this:
rangesum( aggr( NODISTINCT sum( {< [Company Name] >} Qty ), [Part No] ) )
what about SUM(TOTAL <Part No> Qty) ?
When I filter Company A, the part 2 show 10, instead of 30.
I need it show the grand total of each part, even filter by company or other dimension.
Thanks
Steve
You could do it inside the script:
TABLE:
LOAD * INLINE [
Company Name, Part No, Qty, Total By Part
A, 1, 100, 100
B, 2, 20, 30
C, 3, 30, 70
A, 2, 10, 30
C, 3, 40, 70
];
Left Join (TABLE)
LOAD
[Part No],
Sum(Qty) AS TOTAL
Resident TABLE
Group By
[Part No]
;
maybe this:
rangesum( aggr( NODISTINCT sum( {< [Company Name] >} Qty ), [Part No] ) )
You can override the company selection in the expression:
SUM({<[Company Name]>} TOTAL <Part No> Qty)
You can try this
Sum({<[Company Name]>} TOTAL <Part No> Qty) * Avg(1)
Thanks all, manage to find a solution 😀
Thanks
Steve