Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have table like below. And requirement is if Dim=C then I need sum(Val1) and I have writtern expression like below but problem is if I select any Dim value then it is disappearing but as per my requirement it shouldn't be disappear. so If I select A then C value is 100 and for B 200 and for C 300.
LOAD * INLINE [
Dim, Val, Val1
A, 10, 100
B, 20, 200
C
];
if(Dim = 'C',
$(=sum(Val1)),
sum(Val)
)
-Priya
Please find new app for solution.
try like this:
tmp:
LOAD * INLINE [
Dim, Val, Val1
A, 10, 100
B, 20, 200
C
];
Concatenate
Load
'C' as Dim,
sum(Val) as Val,
sum(Val1) as Val1
Resident tmp;
regards
tim
It will work but my actual datamodel is huge so I cannot touch it so I need it as expreesion.
thanks for the reply.
Have you tried this
if(Dim = 'C', $(=sum(Val1)),sum(Val1))
if(Dim='C', sum(TOTAL if(match(Dim, 'A', 'B'), Val1)))
or
if(Dim='C', sum(TOTAL if(Dim <> 'C', Val1)))
tried but no luck
tried but no luck
Hi,
Please let me know if this works
if(Dim='C',sum({$<Dim=>} Val1),sum(Val1))
didn't realize that you want to select 'C'.
Then you use Set Analysis the remove the selection
if(Dim='C', Sum({<Dim=>}Val1), sum(Val1))
it is already tried and it is not working