Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

SUMIF in PowerBI?

So I have two data sets - one named data and one named plan. I need to create a column in the plan dataset that pulls in information from the data dataset. There is a column called "Line" in both datasets that I will be looking up on. Then there is a "Total Amount" column in the data dataset where I want to sum the information from. I've looked up how to do a SUMIF in Power BI before but it seems like there are a number of different ways and they don't really make sense to me.

 

Here is how I would accomplish what I would want to do with a SUMIF formula in Excel:

 

= SUMIF('Data'!LineColumn, 'Plan'!LineColumn, 'Data'!TotalAmountColumn)

 

Where the first argument is a lookup column, the second argument is the value you're looking up on a specific row, and the third argument is column that your summing information from that matches the lookup criteria.

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

There must be a relationship between these two tables. I guess the table "Plan" is in the 1-side. You could try this formula. The "relatedtable" will find out all the related data and sumx will sum the [Total amount] up.

 

Column =
SUMX ( RELATEDTABLE ( Data ), [TotalAmount] )

SUMIF in PowerBI.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.