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
DataUser
Helper I
Helper I

Calculate column in one table based off of 3 criteria in another table

I have two Data tables - Table A and Table B. I want to calculate a column in Table A.

 

Q1: How do I set up the "Manage Relationships"?

Q2: What is the formula for the column called "Total" in order to achieve the below? When the Date in Table A is between or equal to the Start & End dates in Table, AND the Status is Active (not Archive), I want a sum for that date of the total amount

 

 

2021-02-18_18-12-58.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@DataUser , You can create a new column like

 

sumx(filter(table2, table1[Date] >= table2[start Date] && table[Date] <=table2[end date] && Table2[Status] = "Active"),Table[Amount])

 

I have discussed various way in this video : https://www.youtube.com/watch?v=czNHt7UXIe8

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@DataUser , You can create a new column like

 

sumx(filter(table2, table1[Date] >= table2[start Date] && table[Date] <=table2[end date] && Table2[Status] = "Active"),Table[Amount])

 

I have discussed various way in this video : https://www.youtube.com/watch?v=czNHt7UXIe8

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.