Forum Discussion

Josearce's avatar
Josearce
Regular Visitor
7 years ago
Solved

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?
  • v-juanli-msft's avatar
    7 years ago

    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"
        )
    )

     

     

    Best Reagrds

    Maggie