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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
aldanab
New Member

Filter dates Before or equal last month

I would like to filter a column that  only contains data until the last day of the last month. 

Also I can say all data before current month. 

It will give acumulative figures for Balance at date of end of month . 

 

 

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Roughly like this:

 

<date>  <=EOMONTH(TODAY(),-1)

View solution in original post

Anonymous
Not applicable

Hi @aldanab ,

Have you solved your problem? If not, please try this way.
Here is my sample data:

vjunyantmsft_0-1711433316118.png

You can use this M function to achieve filter:

= Table.SelectRows(#"Changed Type", each [Date] < Date.StartOfMonth(DateTime.Date(DateTime.LocalNow())))

The output is as below:

vjunyantmsft_1-1711433376984.png

And about "It will give acumulative figures for Balance at date of end of month", my understanding is that you want to sum the values for each month. You can follow these steps:
Add two Custom Columns to find the month and year of Date:

vjunyantmsft_2-1711433611540.png

vjunyantmsft_3-1711433621924.png

And the table is as below:

vjunyantmsft_4-1711433651131.png

Then use Group By function:

 

vjunyantmsft_6-1711433723727.png

And the final output is as below:

vjunyantmsft_7-1711433748715.png


Best Regards,
Dino Tao
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

4 REPLIES 4
Anonymous
Not applicable

Hi @aldanab ,

Have you solved your problem? If not, please try this way.
Here is my sample data:

vjunyantmsft_0-1711433316118.png

You can use this M function to achieve filter:

= Table.SelectRows(#"Changed Type", each [Date] < Date.StartOfMonth(DateTime.Date(DateTime.LocalNow())))

The output is as below:

vjunyantmsft_1-1711433376984.png

And about "It will give acumulative figures for Balance at date of end of month", my understanding is that you want to sum the values for each month. You can follow these steps:
Add two Custom Columns to find the month and year of Date:

vjunyantmsft_2-1711433611540.png

vjunyantmsft_3-1711433621924.png

And the table is as below:

vjunyantmsft_4-1711433651131.png

Then use Group By function:

 

vjunyantmsft_6-1711433723727.png

And the final output is as below:

vjunyantmsft_7-1711433748715.png


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

Thank you !! I made it work with this filter 

 

aldanab_1-1714027296249.png

 

lbendlin
Super User
Super User

Roughly like this:

 

<date>  <=EOMONTH(TODAY(),-1)

I couldnt make it work with this. But I finally found it simply, It will work for some years , but not for ever 😂

aldanab_0-1714027153170.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors