5 Replies Latest reply on Jul 5, 2016 12:22 PM by Thomas Dodds

# How to get delta value from a measure column

Hi all,

I would like to display delta value in the following scenario like this 8-2 =6.

The value 6 should be displayed in the next row. How to achieve this. Please advice.

Regards,

Chandra kanth.

• ###### 1. Re: How to get delta value from a measure column

Hi Chandra Kanth,

You can do it by creating a calculated column on an dimension.

Regards,

Akansh

• ###### 2. Re: How to get delta value from a measure column

Hello Chandra,

You could use analytics functions, with LAG and LEAD.

Formulas:

1- Purchase Order:  "ORDER"."PURCHASE ORDER"

2- Value Order:  "EXECUCION"."VALUE ORDER"

3- Lag Column:   EVALUATE('LAG(%1,1) over (order by %2)' as double,  "EXECUCION"."VALUE ORDER" , "ORDER"."PURCHASE ORDER")

4- Delta Columna "EXECUCION"."VALUE ORDER"  -  (EVALUATE('LAG(%1,1) over (order by %2)' as double,  "EXECUCION"."VALUE ORDER" , "ORDER"."PURCHASE ORDER"))

AS your question do something like this,your delta Formula:

"Total Actions Count" - (EVALUATE(LAG(%1,1) OVER (order by %2)' as double, "Total Actions Count", "Plan"  ))

Tip: To use EVALUTE FUNCTION you have to set up your NQSConfig.INI, set up the EVALUATE LEVEL.

Kind Regards.

César

• ###### 3. Re: How to get delta value from a measure column

Hi cesar,

The output should be displayed below (next row) NOT in next column. How to get value in the next row.

Regards

Chandra kanth.

• ###### 4. Re: How to get delta value from a measure column

Hello chandra,

This delta row its just for this two plans? 28 29?

Or there is a possibility that you could compare 3, 4 plans?

Kind regards,

Cesar

• ###### 5. Re: How to get delta value from a measure column

Your use of information drives your physical data model design ... you need a fact table that is keyed to a dimension that has each iteration value ... you will calculate each row and the delta to it's corresponding row ... now you can show either value or both.