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-piga-msft's avatar
    v-piga-msft
    7 years ago

    Hi Josearce,

     

    Have you solved your problem? If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

     

    If you still need help, please try the formula below.

     

    Column =
    VAR currentmonth = 'Calendar Table'[Date].[MonthNo]
    VAR currentday = 'Calendar Table'[Date].[Day]
    VAR maxmonth =
        MONTH ( MAX ( 'Calendar Table'[Date] ) )
    VAR maxday =
        DAY ( MAX ( 'Calendar Table'[Date] ) )
    RETURN
        currentmonth & "/"
            & currentday
            & "-"
            & maxmonth
            & "/"
            & maxday
    

     

     

    Best  Regards,

    Cherry