Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table which has values like this
A | B |
001 | 15 |
001 | 15 |
001 | 15 |
002 | 20 |
002 | 20 |
002 | 20 |
003 | 35 |
003 | 35 |
003 | 35 |
I want to have sum of B for different ids of A.Like for 001 we'll take 15, 20 for 002 and 35 for 003 and the final answer would be 70. I want to do this in from end.
something like this ?
yes..but this will not work. I just showed an example but there are multiple ids with lets say value 15 but here 15 will be considered just once but I want it to be considered for every id.
A | B |
001 | 15 |
001 | 15 |
001 | 15 |
002 | 20 |
002 | 20 |
002 | 20 |
003 | 35 |
003 | 35 |
003 | 35 |
004 | 15 |
004 | 15 |
004 | 15 |
could you share the final output you are looking for
85..in the new example table
try this
tab:
load A,only(B) as B group by A;
load * inline
[
A, B
001, 15
001, 15
001, 15
002, 20
002, 20
002, 20
003, 35
003, 35
003, 35
004,15
004,15
004,15
];
Try this one,
Sum(distinct B) in one new column
A | Sum(distinct B) |
Total | 85 |
1 | 15 |
2 | 20 |
3 | 35 |
4 | 15 |
If your Dimension is A, Distinct will apply per value of A. So 15 will be used for both 001 and 004.
-Rob