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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Victor_Oliveira
New Member

Filtering accumulated measures with dates

Hi!

I´m having trouble with the measure below

 

CALCULATE(
    DISTINCTCOUNT('Base Geral'[Codigo]), 
    'Base Geral'[Status] = "Concluído", 
    'Base Geral'[IO] = -1,
    FILTER(
        ALL('calendario'[Date]),
        'calendario'[Date] <= MAX('calendario'[Date])
    )
)

 

 
The objective is to have an accumulated ammount throughout time, but I want to be able to filter dates and not modify the result.
for example:

Victor_Oliveira_0-1726862229251.png
If I alter the date period the results change

Victor_Oliveira_1-1726862319820.png

how can I change my measure so that my date filter alters the period on the visual but doesn´t alter the result on my measure?

 




 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Victor_Oliveira 

 

Your measure should be correct, and at least in my simple test, it worked.
Make sure your date slicer is using 'calendario'[Date], not 'Base Geral'[Date].

vxianjtanmsft_0-1727057146508.png

vxianjtanmsft_1-1727057179216.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Victor_Oliveira 

 

Your measure should be correct, and at least in my simple test, it worked.
Make sure your date slicer is using 'calendario'[Date], not 'Base Geral'[Date].

vxianjtanmsft_0-1727057146508.png

vxianjtanmsft_1-1727057179216.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Ashish_Mathur
Super User
Super User

Hi,

Cannot understand your requirement.  Share the download link of the file and show the expected result.  Please ensure that table/column names are in English.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
marcelsmaglhaes
Super User
Super User

Hey @Victor_Oliveira 

Maybe you can use ALLSELECTED instead of ALL to keep date filters. This theoretically allows the accumulation while respecting date filters from slicers.

Acumulado =
CALCULATE(
DISTINCTCOUNT('Base Geral'[Codigo]),
'Base Geral'[Status] = "Concluído",
'Base Geral'[IO] = -1,
FILTER(
ALLSELECTED('calendario'[Date]),
'calendario'[Date] <= MAX('calendario'[Date])
)
)


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



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.