Skip to Content

Variance of key figure in same column as an adjocent column in BEx query

Hello All,

I have a requirement to show the variance of particular key figure as an adjacent column in a query. I am using this query in SAP Design Studio and will enable exceptions in the variance column.

PFB example. I would like to have 12 month data like this with the variance from previous month as next column. (for Feb, 105-100=5)

I can't fix each month value in a key figure structure since its not useful for me in SAP Design studio. I think, with fixed KF structure, its possible by cell reference. Any possibility to achieve this by defining a formula with exception aggregation as variance? I get values only in total when I try that.

calmonthcountvarianceJan100Feb1055Mar98-7Apr1035May89-14

Please suggest some solution. Its urgent and quick response would be highly appreciated.

thanks in advance

Regards,

Nikhil Joy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 07, 2015 at 12:14 AM

    Hi Nikhil,

    Mybe you can try this:

    Create a replacement path variable (ZVAR) referenced to your time InfoObject (like 0CALMONTH or 0CALMONTH2, etc).

    Create a fix structure in columns and créate two key figures.

    In the first KF add a restriction using your recent created variable (ZVAR) and applies a "Constant selection"

    In the second KF add the restriction using the same variable minus 1 (ZVAR - 1) and applies a "Constant selection".

    Maybe this can Works.

    Regards!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 08, 2015 at 10:00 AM

    Hi Nikhil,

    Give a try by using exception aggregation : variance function with Ref Char as calmonth on KF count .Hope this will work for you.

    Regards,

    sunil.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Nikhil Joy

      Hi Nikhil,

      For the non-cumulative Kf's exception aggregation functions like AV1,AV2,First Value,Last Value,Max and Min will work so that might be the reason your getting zeros.Look for the option for going user exit or virtual KF and convert the char to time.