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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
robdan
Frequent Visitor

Help me build a SUMIF funtion in powerBI

I would need to replicate, in a new column, a very simple SUMIF function. I've tried for hours, but i'm unable to complete this task in PowerBI.

My database (DB_CORP) has, for each observation a single client name and 3 columns: "CUSTOMER" (the customer name); "GROUP" (the holding name of the customer, multiple customers can have the same GROUP name); "REVENUE" 

Below a screenshot of the new column formula I need to replicate. If a Group's revenues are negative, put a "Y" for each customer part of that group, and viceversa.

 

Capture.JPGve

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

hi, @robdan 

 try below for column

Column = 
var a = SUMX( FILTER('Table','Table'[group]=EARLIER('Table'[group])),'Table'[revenur])
return
IF(a<0,"y","n")

 

 

Dangar332_0-1704997424199.png

 

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @robdan 

for a calculated column, you may try

Group Revenue =
IF (
SUMX (
CALCULATETABLE ( ALLEXCEPT ( 'Table', 'Table'[Group] ) ),
'Table'[Revenue]
) >= 0,
"N",
"Y"
)

Dangar332
Super User
Super User

hi, @robdan 

 try below for column

Column = 
var a = SUMX( FILTER('Table','Table'[group]=EARLIER('Table'[group])),'Table'[revenur])
return
IF(a<0,"y","n")

 

 

Dangar332_0-1704997424199.png

 

who knew that asking on the internet would have saved me a couple of hours! thanks a lot it works very well, unfortunately i'm not familiar with DAX

Hi, @robdan 

 

Asking on internet is easy

But it valueble when you shake your mind and still not get answer.

you learn new things and gain knowledge from your efforts.

 

Enjoy your day 😊

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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