Forum Discussion
Create a column with a specific date
I am trying to create a column with a specific date (date only) using M-query.
this will be the report date. whereby i will calculate an aging to some other data.
I am not looking for today's date though.
for example, i want all the column to include the same date of 1-Dec-2017.
thanks in Advance
If your problem has been resolved, please help accept solution. Your contribution is highly appreciated.
4 Replies
- MarcelBeugCommunity Champion
Looks like you need a parameter for your reference date.
No need to add a column with the reference date: you can use the parameter value to calculate the aging.
But you can still add a column with the reference date, though.
Both are included in this query:
let Source = #table(type table[Date = date],List.Zip({List.Dates(#date(2017,1,1),20,#duration(15,0,0,0))})), AddedAging = Table.AddColumn(Source, "Aging", each RefDate - [Date], type duration), AddedRefDate = Table.AddColumn(AddedAging, "RefDate", each RefDate, type date) in AddedRefDate- asdaifallahNew Member
Thank you so much. Appreciate the quick help!
- v-chuncz-msftCommunity Support
If your problem has been resolved, please help accept solution. Your contribution is highly appreciated.