Excel Power Query Last month to date

gazmoz17

Board Regular
Joined
Sep 18, 2020
Messages
158
Office Version
  1. 365
Platform
  1. Windows
Hi,

Really struggling with this to find any help on the web.

Have a current query which is "Last Month data"
Wish to dupe this query and change it to last month to date. End game being I can ref this alongside "Current Month" query so I have month to date versus last month to date etc.

So new query "Last MTD" would run (based on today) 01/09/23-26/09/23

Many Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I thought this would be pretty simple being what most businesses look at.

This is what Im looking to do:

-- unavailable video removed --

But I dont use Power BI, is this possible in the excel power query?

Many Thanks
 
Last edited by a moderator:
Upvote 0
The video you posted is not available to public. Therefore, it has been removed.

I suggest posting a sample data set with your query, and desired result. It would be more helpful to help to solve your question.
 
Upvote 0
You can create a variable, which you use in a filter statement.
The var would be like
Power Query:
Date.StartOfMonth(Date.AddMonths(Date. From(DateTime. LocalNow()), -1))

The filter is then Date>= parameter.
 
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,840
Members
449,411
Latest member
adunn_23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top