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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ozturkk
Frequent Visitor

Create a column in table A that calculates values from Table B using date filter

I'm a new user, so bear with me:

I have a pretty simple data set in Table B that has data for when each ID is expected to receive revenue.  It looks like this:

ozturkk_0-1701847210556.png

So there can be multiple rows for each ID.  I want to create a new column in Table A (which has only one row for each ID) that brings the total income for each project when the date is today or earlier.  

 

I tried this, but it is bringing me the same value for all IDs:

Bugüne Tahmini Gelir =
 CALCULATE(
    SUM(TableB[INCOME]),
    CALCULATETABLE(
        VALUES(TableB[ID]),
        TableB[Date] <= TODAY()
    )
)
3 REPLIES 3
Fowmy
Super User
Super User

@ozturkk 

Please try this: 

Bugüne Tahmini Gelir =
VAR __Date = TODAY()
RETURN
 CALCULATE(
    SUM(TableB[INCOME]),
        TableB[Date] <= __Date
    )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

ozturkk
Frequent Visitor

Thank you for your reply. Sadly, I am still getting the same value for all IDs

ozturkk
Frequent Visitor

l have also tried this to no avail:

SUMX( VALUES('TableB'[ID]), CALCULATE( SUM('TableB'[INCOME]), 'TableB'[DATE] <= TODAY(), 'TableB'[ID] = EARLIER('TableB'[ID]) ) )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.