Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8545

Conditional Sum - This Year compared to same Period Last Year

$
0
0

Hello all,

 

I am having a bit of a problem that's so easy to get with excel but I'm having a hard time in Crystal.

 

I am trying to re-create a layout as below in crystal reports. I am importing both Jan-14 and Jan-13 into the report via SQL Commands as the source. I have tried Formulas below but they do not give me a breakdown by month. Can someone please guide me where I went wrong? The formulas give me the total for the 2 months and not broken down by their respective months.

 

dim TotalAmt as number

 

if {Command.MONTH} = {?EndDate} then

    TotalAmt = Sum ({Command.Pax}, {Command.FLIGHT#})+TotalAmt

formula = TotalAmt

 

else

    formula=0

end if

 

Untitled.png


Viewing all articles
Browse latest Browse all 8545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>