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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kennoe
Helper I
Helper I

add amounts in one column conditional on other columns

I need to add together amounts in one column that are conditional on the two other columns. The simplified version of the table below illustrates what I need to do.

Status

Amount

Identifier

Planned

$100,000

1

Allocated

$100,000

1

Released

$100,000

1

Released

$15,000

1

Planned

$800,000

2

Allocated

$800,000

2

Released

$800,000

2

Planned

$1,000,000

2

Allocated

$1,000,000

2

Released

$1,000,000

2

Planned

$50,000

3

Allocated

$50,000

3

Released

$50,000

3

 

For each of the identifiers (1, 2 and 3), I want to add up the Amounts that correspond to the Status of “Released”. Using this table, the end result will be:

Identifier

Amount

 

1

$115,000

2

$1,800,000

3

$50,000

 

If additional amounts were added with a Released Status, the Amount column would need to be updated.

 

Thanks

Steve

1 ACCEPTED SOLUTION
ChrisMendoza
Resident Rockstar
Resident Rockstar

@kennoe,

 

Measure = 
CALCULATE(SUM(YourTableName[Amount]),ALLEXCEPT(YourTableName,YourTableName[Identifier]),YourTableName[Status]="Released")

4.PNG






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
ChrisMendoza
Resident Rockstar
Resident Rockstar

@kennoe,

 

Measure = 
CALCULATE(SUM(YourTableName[Amount]),ALLEXCEPT(YourTableName,YourTableName[Identifier]),YourTableName[Status]="Released")

4.PNG






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Thanks Chris

 

When I apply this formula to my data, there is a mismatch between some, but not all of the amounts and the identifiers. (Using my example table, it would be like the amount for identifier 1 being aligned with identifier 2 and vice versa) What could be the potential reasons for this? The data in the actual tables used appear to be aligned appropriately.

Cheers

Steve

@kennoe,

 

Hard for me to tell, can you share more of your data?






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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