Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi everyone.
pls look at the file I've attached.
I have only two columns one as budget_type and the other is the vale of it.
I want to add a new record that her budget_type will called "profit" and her value will be:
zzxx-mmkk (170-150) =20 , I want it to be calculate in the script itself.
how can I do that? is it possible to add records based on other recordes in the same dimension ?
thanks a lot
David
Ok, i see. You can do it with:
profit:
LOAD
company,
sum(IF([budget_type]='zzxx', [value])) - sum(IF([budget_type]='mmkk', [value])) AS profit
RESIDENT data
GROUP BY company;
See attached file.
Regards.
I don´t see the sense of your request.
Why do want to create a new record for profit in script and not in a table or via variable? When you´ve got more than two values, how should you decide what values should be subtract?
hi,
see the new file I've attached.
for each company I have only two values in the budget_type dimension. (the mmkk and the zzxx)
And for each company I want to add a new value called profit.
The users want to select a record name profit (which is a record in the dimension budget_type ) and see the value of it (calculate as zzxx-mmkk )
What are my options if I am not doing it over the script?
thanx,
David
Ok, i see. You can do it with:
profit:
LOAD
company,
sum(IF([budget_type]='zzxx', [value])) - sum(IF([budget_type]='mmkk', [value])) AS profit
RESIDENT data
GROUP BY company;
See attached file.
Regards.
almost...almost...
But you gave me a direction.
I told you its simple.........
I meant to this.
(see attachment)
thanx again