Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Trend Calculation

$
0
0

Hello Forum Members,

I have to calculate a Trend value.

I have Promised, Trend, Expected, Actual, Date columns.

Trend Logic:

  1. Past dates including current month  (promised-actual)
  2. Future dates (promised-Expected)

Region

Promised

Trend

Expected

Actual

Date

Trend Logic

North

100

50

200

50

January, 2014

Past dates (promised-actual)

South

200

100

100

100

February 2014

Past dates (promised-actual

East

100

50

200

50

June 2014

Past dates (promised-actual

West

400

100

300

200

September, 2014

Future dates (promised-Expected)

North East

500

100

400

300

December 2014

Future dates (promised-Expected)

Please help me.

Thanks,

Sqlquery9


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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