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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Rygar
Helper II
Helper II

Find start date of week and repeat the date

Dear Community,

 

i have a Column with ascending dates and need the starting date of each week in a second column:

Bild1.png

I need this in Power Query. Example File here.

Thanks and regards, Michael

1 ACCEPTED SOLUTION
m_alireza
Solution Specialist
Solution Specialist

Hi @Rygar ,

Create a Custom Column in Power Query and enter this: 

=Date.StartOfWeek([From this], Day.Monday)


where [From this] equals name of your date column

View solution in original post

4 REPLIES 4
AntrikshSharma
Super User
Super User

@Rygar Use this:

let
    Source = Table.FromRows (
        Json.Document (
            Binary.Decompress (
                Binary.FromText (
                    "Vc67DcAwDAPRXVwHkER/Ys1ieP81DBdByPJVd2uVaUiDA2U/V9VF8StNAEZlNEZnDMbLmIyUqIt0SCZCLuLb2Ac=",
                    BinaryEncoding.Base64
                ),
                Compression.Deflate
            )
        ),
        let
            _t = ( ( type nullable text ) meta [ Serialized.Text = true ] )
        in
            type table [ #"From this" = _t ]
    ),
    ChangedType = Table.TransformColumnTypes ( Source, { { "From this", type date } } ),
    WeekOfYear = 
        Table.AddColumn (
            ChangedType,
            "Week of Year",
            each Date.WeekOfYear ( [From this], Day.Monday ),
            Int64.Type
        ),
    GroupedRows = 
        Table.Group (
            WeekOfYear,
            { "Week of Year" },
            {
                {
                    "Transformation",
                    ( Dates ) =>
                        Table.AddColumn (
                            Table.RemoveColumns ( Dates, "Week of Year" ),
                            "To this",
                            each List.Min ( Dates[From this] ),
                            type date
                        )
                }
            }
        ),
    RemovedOtherColumns = Table.Combine ( GroupedRows[Transformation] )
in
    RemovedOtherColumns

 

Thanks a lot 4 your support!

 

m_alireza
Solution Specialist
Solution Specialist

Hi @Rygar ,

Create a Custom Column in Power Query and enter this: 

=Date.StartOfWeek([From this], Day.Monday)


where [From this] equals name of your date column

Great! Thanks a lot.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors