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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SUMIF Formula

Author  Topic 

atuljadhavnetafim
Starting Member

25 Posts

Posted - 2013-10-30 : 01:05:55
Dear Sir

i am using SUMIF formula in excel, i have very big data in one sheet and in second sheet i have format which give me sum of value with sigle condition, e.g. my table having Date wise sales of all states, so i get particular States total sales from sumif formula, but when i send this file to my managers it is very big and it takes time to open from server also,

so i want once solution, if i salve my raw data file to sql server as table, and save excel file in my local drive and use sumif formula which will give me sum of that particular states sale from my sql table,

is it possible ?

i have tried to make pivot from sql server table it is work fine but it is possible to get result by using sumif formula ?

this is my first post and expective good responce
thanks in advance

Atul Jadhav

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-30 : 01:26:51
you can use CASE WHEN in SQL Server to get SUMIF functionality

ie something like

SUM(CASE WHEN <your criteria> THEN <your field> ELSE 0 END)


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2013-10-30 : 05:31:03
<<
i have tried to make pivot from sql server table it is work fine but it is possible to get result by using sumif formula ?
>>

What is wrong with using it?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -