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

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

Reply
TheHans
Helper I
Helper I

Create a measure with aggregated values considering existing filters

Dear Community,

 

I have a project table containing many projects and values per month. I would like to create a measure that accumulates all values p to a certain date but considering existing filters, such as for example only for "Project A" if this is chosen in the visual filters.

 

ProjectFinancials Table

ProjectIDValuePeriod YMPropertyABC
Project A10202201e
Project A20202202f
Project A30202203g
Project A25202204g
Project A48202205f
Project A15202206e
Project B84202201r
Project B85202202r
Project B29202203r
Project B67202204z
Project B28202205z
Project B44202206s

 

Now I have created a measure like this, however this one does not consider any filters (since I chose "ALL").

 

PlannedAcc = 

VAR EndDate = SELECTEDVALUE(DateTable[Period YM]) // this is a value YYYYMM

RETURN

SUMX(

CALCULATETABLE(

'FACT-Project Financials',

ALL('FACT-Project Financials'),

'FACT-Project Financials'[Period YM] <= EndDate
),

'FACT-Project Financials'[Value]

)

I plan to use a clustered column chart with the months on the x-axis and the cumulated values per month. Any filter applied to the chart, such as project ID or some other property needs to take effect on the cumulated values.

 

Can anyone help?

 

Thanks in advance

H.

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @TheHans ,

 

try this.

PlannedAcc = 

VAR EndDate = MAX(DateTable[Period YM]) // this is a value YYYYMM

RETURN

CALCULATE(
    SUM('FACT-Project Financials'[Value]),
    FILTER(ALL(DateTable), DateTable[Period YM] <= EndDate)
)
Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

2 REPLIES 2
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @TheHans ,

 

try this.

PlannedAcc = 

VAR EndDate = MAX(DateTable[Period YM]) // this is a value YYYYMM

RETURN

CALCULATE(
    SUM('FACT-Project Financials'[Value]),
    FILTER(ALL(DateTable), DateTable[Period YM] <= EndDate)
)
Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


@mwegener 

Thanks a lot. That helps. 

Hans

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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