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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
v-xianjtan-msft
Community Support
Community Support

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
v-xianjtan-msft
Community Support
Community Support

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
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.