Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Can I generate a date column from [Date From] until [Date To] in Power BI.
Similar like below image
I have create for 2024 04
I am getting the date range from [Date From] to [Date To]
Solved! Go to Solution.
Hi @ashmitp869, like this?
Before
After
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtE1MFTSUTLWNzDUB3GBbEMzOCdWB6bICCRhjqTK2ACLKnOghBFQlTFMlaW+gQlUUSwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Period = _t, #"Date From" = _t, #"Date To" = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Date From", type date}, {"Date To", type date}}),
Ad_Dates = Table.AddColumn(ChangedType, "Dates", each List.Dates([Date From], Duration.TotalDays([Date To] - [Date From]) +1, #duration(1,0,0,0)), type list),
ExpandedDates = Table.ExpandListColumn(Ad_Dates, "Dates")
in
ExpandedDates
Hi @ashmitp869, like this?
Before
After
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtE1MFTSUTLWNzDUB3GBbEMzOCdWB6bICCRhjqTK2ACLKnOghBFQlTFMlaW+gQlUUSwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Period = _t, #"Date From" = _t, #"Date To" = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Date From", type date}, {"Date To", type date}}),
Ad_Dates = Table.AddColumn(ChangedType, "Dates", each List.Dates([Date From], Duration.TotalDays([Date To] - [Date From]) +1, #duration(1,0,0,0)), type list),
ExpandedDates = Table.ExpandListColumn(Ad_Dates, "Dates")
in
ExpandedDates
Hi,
Option 1 - Power Query- Add Column-Custom Column use the formula below
=Date.AddDays([Date], 13)
Option 2 - create a column in data panel and use the DAX formula below. If it necessary use the relevant table and column names from your data
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.