Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I need to generate a rolling calendar lookup table (that I need to add columns to) where today would be the middle date. Ideally, it would be 90 days before today and 30 days in the future.
I was helped on here the other day with creating a rolling 90 day calendar, but I wasn't able to pick through the code to add the future 30 days as well.
let
Source =
{
Number.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()), -90))..
Number.From(DateTime.Date(DateTime.LocalNow()))
},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), {"Date"}, null, ExtraValues.Error),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Date", type date}})
in
#"Changed Type"
Any help is appreciated!
Solved! Go to Solution.
Hi @Imthedan
use the following M-Code:
// DateRange
let
Source =
{Number.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()), -90))..
Number.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()), 30))
},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), {"Date"}, null, ExtraValues.Error),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Date", type date}})
in
#"Changed Type"
Regards FrankAT
Hi @Imthedan
use the following M-Code:
// DateRange
let
Source =
{Number.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()), -90))..
Number.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()), 30))
},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), {"Date"}, null, ExtraValues.Error),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Date", type date}})
in
#"Changed Type"
Regards FrankAT
Thank you!
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
84 | |
66 |