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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
alexei7
Continued Contributor
Continued Contributor

Help with SUMIF-like DAX

Hi,

 

I'm trying to create a formula which will calculate the sum of income (from the income table) where a URN in the income table matches a URN in the registrations table

 

In Excel-lingo this would be something like:

 

"=sumif(registrationsURN, incomeURN, incomeAmount)"

 

Can anyone help?

Thanks

 

5 REPLIES 5
wonga
Continued Contributor
Continued Contributor

Establishing a relationship between the two tables should do the trick in terms of getting the "If table1[urn] = table2[urn] then sum(income)"

Sean
Community Champion
Community Champion

the general formula will be something like this...

 

Measure = CALCULATE(SUM(Table[Column]), Filter(s).....)

 

but how you list the filters depends on what you are trying to accomplish

 

you need to provide more details

alexei7
Continued Contributor
Continued Contributor

Thanks Sean

 

I have two tables:

 

1. Registrations (columns include "URN", "Registration Date" as well as other fields relating to the registration. URN is not unique/primary key)

2. Income (columns include "URN", "Income Amount", "Income date" as well as other field relating to the income. Again, URN is not unique/primary key).

 

I'm trying to create a measure which will give me the income from the Income table where the URN is also present in the Registrations table.

 

 

 

alexei7
Continued Contributor
Continued Contributor

 

I seem to have got this working 

 

I created a lookup column ("RegisteredURN"), using LOOKUPVALUE in the Income table to lookup the URN from a unique version of the URNs from the Registrations table.

 

Then I created a measure in the Income table:

CALCULATE(sum(Income[Income Amount]),Income[RegisteredURN]<>"")

 

Sean
Community Champion
Community Champion

@alexei7 Great looks like you got it. SUM [Income Amount] for all non blank [URN]

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors