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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MAruna
Helper I
Helper I

I need Display week as series

Hi All,

 

I need Assistence on this

 

I have Date column, in that i need to present weeks as

 

May 1 to 7 

May 8 to 14 

May 15 to 21

May 22 to 28 

May 29 to June 4 Like this

 

Thank you for in Advance.

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

It is for creating a calendar table like below.

 

Jihwan_Kim_0-1685540553804.png

 

 

New calendar table = 
VAR _t =
    ADDCOLUMNS (
        CALENDAR ( DATE ( 2023, 1, 1 ), DATE ( 2023, 12, 31 ) ),
        "Year-Week",
            IF (
                MONTH ( [Date] ) = 1
                    && WEEKNUM ( [Date], 21 ) > 50,
                YEAR ( [Date] ) - 1 & "-"
                    & WEEKNUM ( [Date], 21 ),
                YEAR ( [Date] ) & "-"
                    & WEEKNUM ( [Date], 21 )
            )
    )
VAR _weekcolumn =
    ADDCOLUMNS (
        _t,
        "weekcolumn",
            IF (
                MONTH ( MINX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ) )
                    = MONTH ( MAXX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ) ),
                FORMAT (
                    MINX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                    "mmm-dd"
                ) & " to "
                    & FORMAT (
                        MAXX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                        "dd"
                    ),
                FORMAT (
                    MINX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                    "mmm-dd"
                ) & " to "
                    & FORMAT (
                        MAXX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                        "mmm-dd"
                    )
            )
    )
RETURN
    _weekcolumn

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you @Jihwan_Kim ,

 

I have already Date column.

 

Hi,

Thank you for your message, if you already have a date column, and if your expected outcome is to create an additinal column in the same table, please check the below picture and the attached pbix file.

Thank you.

 

Jihwan_Kim_0-1685588979417.png

 

WeekColumn CC =
VAR _t =
    ADDCOLUMNS (
        'Calendar',
        "Year-Week",
            IF (
                MONTH ( [Date] ) = 1
                    && WEEKNUM ( [Date], 21 ) > 50,
                YEAR ( [Date] ) - 1 & "-"
                    & WEEKNUM ( [Date], 21 ),
                YEAR ( [Date] ) & "-"
                    & WEEKNUM ( [Date], 21 )
            )
    )
VAR _weekcolumn =
    ADDCOLUMNS (
        _t,
        "weekcolumn",
            IF (
                MONTH ( MINX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ) )
                    = MONTH ( MAXX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ) ),
                FORMAT (
                    MINX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                    "mmm-dd"
                ) & " to "
                    & FORMAT (
                        MAXX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                        "dd"
                    ),
                FORMAT (
                    MINX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                    "mmm-dd"
                ) & " to "
                    & FORMAT (
                        MAXX ( FILTER ( _t, [Year-Week] = EARLIER ( [Year-Week] ) ), [Date] ),
                        "mmm-dd"
                    )
            )
    )
RETURN
    SUMMARIZE (
        FILTER ( _weekcolumn, 'Calendar'[Date] = EARLIER ( 'Calendar'[Date] ) ),
        [weekcolumn]
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.