Forum Discussion
To add max date from a table to date table
- Anonymous4 years ago
Ansar,
You can use: List.Max(Data[Pstng Date])
If you want to have a list of dates from tha maximum [Pstng Date] date until today you can use:
let Source = List.Max(Data[Pstng Date]), AddDates = List.Dates(Source, Number.From(DateTime.LocalNow())+1- Number.From(Source), #duration(1,0,0,0)) in AddDatesYou can minimise it to a single line like this:
Source = List.Dates(List.Max(Data[Pstng Date]), Number.From(DateTime.LocalNow())+1- Number.From(List.Max(Data[Pstng Date])), #duration(1,0,0,0))If you want to create list of dates from some 'fixed' date (or linked to some other parameter) until the maximum date in [Pstng Date] column, then you can use this:
let Source = Date.From("01/01/2020"), AddDates = List.Dates(Source, Number.From(List.Max(Data[Pstng Date]))+1- Number.From(Source), #duration(1,0,0,0)) in AddDatesI hope that helps,
Piotr
- 4 years ago
Anonymous Thanks Dear !! below is what exactly required.
let Source = Date.From("01/01/2020"), AddDates = List.Dates(Source, Number.From(List.Max(Data[Pstng Date]))+1- Number.From(Source), #duration(1,0,0,0)) in AddDatesRegards,
Ansar.
Ansar,
You can use: List.Max(Data[Pstng Date])
If you want to have a list of dates from tha maximum [Pstng Date] date until today you can use:
let
Source = List.Max(Data[Pstng Date]),
AddDates = List.Dates(Source, Number.From(DateTime.LocalNow())+1- Number.From(Source), #duration(1,0,0,0))
in
AddDatesYou can minimise it to a single line like this:
Source = List.Dates(List.Max(Data[Pstng Date]), Number.From(DateTime.LocalNow())+1- Number.From(List.Max(Data[Pstng Date])), #duration(1,0,0,0))If you want to create list of dates from some 'fixed' date (or linked to some other parameter) until the maximum date in [Pstng Date] column, then you can use this:
let
Source = Date.From("01/01/2020"),
AddDates = List.Dates(Source, Number.From(List.Max(Data[Pstng Date]))+1- Number.From(Source), #duration(1,0,0,0))
in
AddDates
I hope that helps,
Piotr
- ansar4 years agoHelper II
Anonymous Thanks Dear !! below is what exactly required.
let Source = Date.From("01/01/2020"), AddDates = List.Dates(Source, Number.From(List.Max(Data[Pstng Date]))+1- Number.From(Source), #duration(1,0,0,0)) in AddDatesRegards,
Ansar.