Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Switch Formula Add up depend on Month for Report
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

232 Posts

Posted - 03/30/2014 :  12:57:21  Show Profile  Reply with Quote
Hi All,

I have this:-


I try modify to:

Eg: But it's not add up apr & may for May amount

The output required as
1) if Fields!Months.Value="May" supposed to add up amount for month Apr & May
2) if Fields!Months.Value="Jun" supposed to add up amount for month Apr & May & Jun
3) if Fields!Months.Value="Jul" supposed to add up amount for month Apr & May & Jun & Jul
Please advise.

Thank you.


Edited by - micnie_2020 on 03/30/2014 13:08:33

Yak Posting Veteran

93 Posts

Posted - 03/31/2014 :  12:00:52  Show Profile  Reply with Quote
Looks like you are creating this formula in SSRS, What is your source? SQL Database or SSAS cube? If it's a SQL Query, you can always use a running total concept and build up the sum from the next immediate month and display that in the report. For SSAS, you can write an MDX script and make it happen.

For an article about Running totals for a SQL Database, look at this link..

Visit for more t-sql code snippets and BI related how to articles.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000