SSRS, How to insert a row with calculation

Hi Experts,

I want to insert a row " % Change", so it will calculate the % change for each column.
For example, in "deal start", it will calculate (3735-2632)/2632=42%.
How can I do it? Thanks.

Please see my dataset. The column" time frame " contains value MTD & PMTD. I want to use (MTD-PMTD)/PMTD

select 'MTD' as timeframe,
sum([mtd]) as dealstart,
(select sum(VDPimpressions) from MakeMyDeal_com.[dbo].[Adobe_Periods] av inner join MakeMyDeal_com..dealer d on av.dealerid=d.DealerID where period ='MTD') as impressions,
(select sum(VDPPencils) from MakeMyDeal_com.[dbo].[Adobe_Periods] av inner join MakeMyDeal_com..dealer d on av.dealerid=d.DealerID where period ='MTD') as pencils,
(select Count(*) from makemydeal_com.."User"
WHERE  userid IN (SELECT userid
                  FROM   makemydeal_com..shopper)
       AND createdate >= Dateadd(MONTH, Datediff(MONTH, 0, CONVERT(DATE, Getdate())), 0)) as users
from [MMD_Feed].[dbo].[DART] d


union 
select 'PMTD' as timeframe,
sum([lastmonth]) as dealstart,
(select sum(VDPimpressions)from MakeMyDeal_com.[dbo].[Adobe_Periods] av inner join MakeMyDeal_com..dealer d on av.dealerid=d.DealerID where period ='PMTD') as impressions,
(Select sum(VDPPencils) from MakeMyDeal_com.[dbo].[Adobe_Periods] av inner join MakeMyDeal_com..dealer d on av.dealerid=d.DealerID where period ='PMTD') as pencils,
(SELECT Count(*) AS USERS
FROM   makemydeal_com.."User"
WHERE  userid IN (SELECT userid
                  FROM   makemydeal_com..shopper)
       AND CreateDate >= Dateadd(month, Datediff(month, -1, Getdate()) - 2, 0)
       AND CreateDate <= Dateadd(month, -1, CONVERT(DATE, Getdate() - 1))) as users
from [MMD_Feed].[dbo].[DART]

Open in new window



Capture.JPG
tanj1035Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nico BontenbalCommented:
In this particular situation I think you can use this expression:
=(first(Fields!dealstart.Value)-last(Fields!dealstart.Value))/last(Fields!dealstart.Value)

Open in new window

This expression needs to be on a row that is outside of the detail group of course.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tanj1035Author Commented:
Thanks for the help. It works!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSRS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.