Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Post Patron
Post Patron

help with a formula to filter the sum of a calculation


I am trying to perform what is seemingly an easy calculation but I cannot get there in DAX.

I am reading several forecats files, to which I give a version: "n" for this month, "n-1" for last month, etc.

I also have an actual spending table, with spending per month up to the latest month of available data (so no versioning). 

What I need to do it to be able to sum up the actuals but only up to the date of the version selected (or version used as a legend in a chart is what I would like to achieve, to show the different curves of forecast + actual per month by file version).


I have a table with file versions that I am reading, that I have now included in my date table (which I hope is the correct way of doing thigs):




The Actuals table just has 4 columns: Project Number, Date, Spending and Year


then I have tried to created a measure for summing the actuals, but it is not working 😞


Spending Versioned (US$) =
VAR VersionSelected = (SELECTEDVALUE(DateTable[EOM Date]))
VAR ActualsAmount = CALCULATE(SUM('ACTUALS'[Spending USH$]),


Can you please guide me in how to do this properly?



Kind regards



Super User
Super User

Hi @ValeriaBreve  check bracket at start and at end in part VAR VersionSelected = (SELECTEDVALUE(DateTable[EOM Date])). I hope this help.

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors