Forum Discussion
dynamic date
- 7 years ago
You can do this in Edit query mode. Here below are the screen shots.
and then right click on the Date header --> Remove duplicate , this will give you one row for each month as last day of the month.
Hope this helps,
SS
- 7 years ago
Anonymous Another way of doing this is.. Using "New Table" option with DAX below
_DimDateEOM = FILTER(CALENDAR("01-01-2018","31-12-2018"),[Date]=EOMONTH([Date],0))
Create a blank query in the query editor and put this in the advanced editor, this will give you end of month dates up to todays date if you want to change the end date, update the DateTime.LocalNow() to the date you want.
let
Source = #date(2013,1,1),
Custom1 = List.Dates(Source, Number.From(DateTime.LocalNow())- Number.From(Source) ,#duration(1,0,0,0)),
#"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Inserted End of Month" = Table.AddColumn(#"Converted to Table", "End of Month", each Date.EndOfMonth([Column1]), type any),
#"Removed Other Columns" = Table.SelectColumns(#"Inserted End of Month",{"End of Month"}),
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns")
in
#"Removed Duplicates"
- Anonymous7 years agoNot applicable
I tried what you mentioned. It has created a table with one row with data as this formula. I dont see any dates.
- PattemManohar7 years agoCommunity Champion
Anonymous Another way of doing this is.. Using "New Table" option with DAX below
_DimDateEOM = FILTER(CALENDAR("01-01-2018","31-12-2018"),[Date]=EOMONTH([Date],0))- Anonymous7 years agoNot applicable
Hi Pattemmanohar,
This was helpful.
Thanks!
- Anonymous7 years agoNot applicable
Did you put it in the advanced editor?
- Anonymous7 years agoNot applicable
Yep Tried that. Didn't work.