This is a migrated thread and some comments may be shown as answers.

Crosstab % changechange

3 Answers 165 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 24 Feb 2017, 11:58 AM

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%  

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 27 Feb 2017, 02:03 PM
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
0
Brian
Top achievements
Rank 1
answered on 28 Feb 2017, 06:00 PM

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.

0
Stef
Telerik team
answered on 02 Mar 2017, 07:54 PM
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
Tags
Report Designer (standalone)
Asked by
Brian
Top achievements
Rank 1
Answers by
Stef
Telerik team
Brian
Top achievements
Rank 1
Share this question
or