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
Josearce
Regular Visitor

Calendar

Can you do one of calendars and how to put from/to week. Example: I have a list of dates from 8/27 to 9/2 and on another column I need that for those dates says 8/27 - 9/2, can that be done?
1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Josearce

Create three calculated columns as below

year = YEAR([date])

weeknum = WEEKNUM([date],2)


date custom =
CONCATENATE (
    CONCATENATE (
        FORMAT (
            CALCULATE (
                MIN ( [date] ),
                ALLEXCEPT ( Sheet8, Sheet8[year], Sheet8[weeknum] )
            ),
            "m/dd"
        ),
        "-"
    ),
    FORMAT (
        CALCULATE (
            MAX ( [date] ),
            ALLEXCEPT ( Sheet8, Sheet8[year], Sheet8[weeknum] )
        ),
        "m/dd"
    )
)

10.png

 

 

Best Reagrds

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Josearce

Create three calculated columns as below

year = YEAR([date])

weeknum = WEEKNUM([date],2)


date custom =
CONCATENATE (
    CONCATENATE (
        FORMAT (
            CALCULATE (
                MIN ( [date] ),
                ALLEXCEPT ( Sheet8, Sheet8[year], Sheet8[weeknum] )
            ),
            "m/dd"
        ),
        "-"
    ),
    FORMAT (
        CALCULATE (
            MAX ( [date] ),
            ALLEXCEPT ( Sheet8, Sheet8[year], Sheet8[weeknum] )
        ),
        "m/dd"
    )
)

10.png

 

 

Best Reagrds

Maggie

Thanks Maggie...I did something with the formula to present it more organized:

 

Weekfromto =

 

VAR Desde = format(Calculate(min('Calendar Table'[Date]),ALLEXCEPT('Calendar Table','Calendar Table'[Year],'Calendar Table'[Week#])),"mmm-dd-yy")

VAR Hasta = format(Calculate(max('Calendar Table'[Date]),ALLEXCEPT('Calendar Table','Calendar Table'[Year],'Calendar Table'[Week#])),"mmm-dd-yy")

 

RETURN

 

Desde &" - "& Hasta

 

Desde means From and Hasta means Through

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.