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
Anonymous
Not applicable

Including a date filter within a measure

Hello,

 

I am trying to use a date filter within a measure. My measure needs to only return data from September 2020 or later. I cannot use a slicer as my measure is drawing data from multiple tables along with certain selection processes. Thanks.

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

Change the date as you need, like this

from September = 
CALCULATE(
    [myMeasure],
    FILTER(
        'Table',
        'Table'[Date]>=DATE(2020,9,1)&&'Table'[Date]<=TODAY()
    )
)

 result:

vangzhengmsft_0-1626919711377.png

If this doesn't work for you, then please consdier sharing more details about it or a simple sample file without any sesentive information so that i may work out with a workaround.

 

Best Regards,
Community Support Team _ Zeon Zheng
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-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

Change the date as you need, like this

from September = 
CALCULATE(
    [myMeasure],
    FILTER(
        'Table',
        'Table'[Date]>=DATE(2020,9,1)&&'Table'[Date]<=TODAY()
    )
)

 result:

vangzhengmsft_0-1626919711377.png

If this doesn't work for you, then please consdier sharing more details about it or a simple sample file without any sesentive information so that i may work out with a workaround.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

selimovd
Super User
Super User

Hey @Anonymous ,

 

you can set the filter in your table to September:

September Values =
CALCULATE(
    [myMeasure],
    MONTH( DateTable[Date] ) = 9
)

 

Or if the measure should only return values if the filter context is September then use the FILTER function:

September Values =
CALCULATE(
    [myMeasure],
    FILTER(
        DateTable,
        MONTH( DateTable[Date] ) = 9
    )
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

Thanks for response. I believe you are right and this is what I'm looking for, however I need values from September until today. How would I write "since 9.2020", not just = 9. Thanks! 

 

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.