Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
zecaben
New Member

Need help making a calendar that autofills days between two dates

Video showing the current excel that you have to manually mark the dates:

https://drive.google.com/file/d/1e2JHw3eA1Pcq9lwUCD9bGXR1DwC3ctO8/view?usp=sharing

 

If someone can help me to automate this process in power bi while still loading the data in excel.

 

Thank you.

1 REPLY 1
Corey_M
Resolver II
Resolver II

Create the datetable in Power Query and it can be loaded into both power BI and excel. If you want just the date paste this code into the advanced editor and edit the two dates to fit your desires

let
 
    FromDate=#date(2020,1,1),
    ToDate=#date(2025,12,31),
    Source=List.Dates(
        FromDate,
        Duration.Days(ToDate-FromDate)+1,
        #duration(1,0,0,0)
    ),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}})
in  #"Renamed Columns"

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.