Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table that stores some dimension codes and their values:
Dimension | Value |
D1 | 10 |
D1 | 90 |
D2 | 20 |
D4 | 35 |
D4 | 5 |
D6 | 20 |
and another table that stores their names.
I need a table with their sum but I also have to insert other dimensions that represent some percents based on the existing ones, like D3, D5, D7.
Dimension | Name | Value |
D1 | Total | 100 |
D2 | Dim 2 | 20 |
D3 | Dim 2 % | 20% |
D4 | Dim 4 | 40 |
D5 | Dim 4 % | 40% |
D6 | Dim 6 | 20 |
D7 | Dim 6 % | 20% |
I tried to make a pivot table with the following expression:
=if(Match(Dimension,'D3'),num(sum({<Dimension={'D2'}>}Value)/sum({<Dimension={'D1'}>}Value),'#.##0%',',','.'),
if(Match(Dimension,'D5'),num(sum({<Dimension={'D4'}>}Value)/sum({<Dimension={'D1'}>}Value),'#.##0%',',','.'),
f(Match(Dimension,'D7'),num(sum({<Dimension={'D6'}>}Value)/sum({<Dimension={'D1'}>}Value),'#.##0%',',','.'),
,num(sum(Value),'#.##0',',','.'))))
but this isn't working.
Can you help me find a better solution for my problem?
Thank you!
No, it is not the solution I needed. I didn't solve the problem.
Thank you!
Thank you, but it is not the solution I needed, because D3 should be D2/D1, so, when
D1=80,
D2=20,
D3 should be D2/D1=20/80=25%, and your solution calculates D3 as 20%.