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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.