Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Below expression return correct GP = 50.2% :-
1-
(
sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} cost)
)
/
(
sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} sales)
)
This is because below 2 load script are working fine :-
if(@241:248T = '2',@137:151T*-1,@137:151T) as [sales],
if(@241:248T = '2',@122:135T*-1,@122:135T) as [cost],
Below return wrong GP = 49% :-
(
sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} profit_amt)
)
/
(
sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} sales)
)
This is because below script is not working fine :-
if(@241:248T = '2',@137:151T*-1,@137:151T)- (@122:135T ) as profit_amt,
Hope some one can help me modify the above script, so that i can get the same GP% for above 2 expression.
Paul
Hi Manish
cost field 122:135T and sales field 137:151T :-
241 is the sign either +ve or -ve represent as 1 or 2
if(@241:248T = '2',@122:135T*-1,@122:135T) as [cost],
if(@241:248T = '2',@137:151T*-1,@137:151T) as [sales], |
if(@241:248T = '2',@137:151T*-1,@137:151T) - if(@241:248T = '2',@122:135T*-1,@122:135T) as Profit |
Hi Manish
Now my GP% for both expression are very closed. almost correct now.
Thank you
Paul