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?
  • 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

5 Replies

  • you should be able to reach your requirement just configuring the slicer with between properties (see attached)

    • Josearce's avatar
      Josearce
      Regular Visitor
      Ok, sorry for not explaining. I have a calendar table with a list of dates. What I need is to add another columnn that on the row that says 8/27 indicates 8/27 - 9/2, on the row that says 8/28 says 8/27 to 9/2 and so on.
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Josearce

         

        Please clarify if

         

        1)  "What I need is to add another columnn that on the row that says 8/27 indicates 8/27 - 9/2, on the row that says 8/28 says 8/27 to 9/2 and so on."

              The above rule is constant and that for the entire period between 8/27 to 9/2 the column should have "8/27-9/2".

         

        2)  If the calendar has several years of data, is the same rule to be applied for other years for the period "8/27 -9/2"

         

        Share some data / pbix file on google drive / one drive and share the link here.

         

        Cheers

         

        CheenuSing