Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello QV Community;
Need some help, appreciate your feedback.
In attached sample table(just a sample table, in actual there are millions of records)I have a pivot table that looks likes this:
Current Table
but would like to have a modified table as below (by adding Gross Margin & Operating Margin rows):
Here is a rather crude way of solving it for your specific purpose:
I suggest you creates those rows additionally within the script (you could simple add this rows per concatenate to the original table from a small inline-table) and adds another field which containes 1 for positive values and -1 for negative values and then you could use something like this:
if(Class = 'Gross Margin', sum({ < Class = {'Sales', 'Cos'}>} Value * PosNegFlag), sum(Value))
- Marcus
Hello Marcus:
Thanks for your response and for your time much appreciated, I applied your suggestion to the model and
was not able to get it to work, would it be possible for you to look at it and kindly let me know where I am wrong
thanks once again,
(I have attached the model with the suggested modification for your review)
Here is a rather crude way of solving it for your specific purpose:
Modify your expression:
Have a look on the solution from petter-s - I like it.
- Marcus
Thanks Peter, appreciate for the solution
Thanks Changuk Bak.
How can I see the code you used to develop this presentation? Thanks