Crosstab % changechange

4 posts, 0 answers
  1. Brian
    Brian avatar
    33 posts
    Member since:
    Mar 2016

    Posted 24 Feb 2017 Link to this post

    I am looking for an example on how to show the percentage difference from one column to the next in a crosstab.

    I have a report that shows sales per month in dollars. For each month, I have added an additional column to the right that should show this value.

    Hown can this be done? Everything points to some custom code which is not acceptable for my situation.

    Example. 

    January   February    March 

    $100  0%  $120  20%  

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 27 Feb 2017 Link to this post

    Hi Brian,

    Reports are data-driven. If you have two fields for each column, the third column can be an expression based on the other two fields. You can use also the Exec function to get data from a group or higher scope within the table item's scope.

    The attached video can be previewed in IE browser. It illustrates the above suggestions.


    I hope this helps.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Brian
    Brian avatar
    33 posts
    Member since:
    Mar 2016

    Posted 28 Feb 2017 in reply to Stef Link to this post

    Thank you for the post. However I don't believe I explained it properly.

    I have attached a picture of the layout of my cross tab. you will see an empty cell that I would like to place my formula in.

    My issue is that the column/row value I need is dynamic. The goal is to compare the total $ for Quarter 1 to Quarter 2 for a Year....and that year could be numerous years.

    In crystal reports (sorry to reference that), there was an option to use the Previous value. 

    your example shows a static table and that is not what was asked. I need to do it in a crosstab as the years/qtrs are dynamic.

  4. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 02 Mar 2017 Link to this post

    Hello Brian,

    Please check the expression suggested by my colleague in this forum post. The idea is to sum only the values you need e.g.:
    =Sum(IIf(Fields.subcol='one',Fields.val,0)) - Sum(IIf(Fields.subcol='two',Fields.val,0))


    The attached video can be previewed in Ie browser. The video illustrates the result of the above expression in our test.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top