Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

column based on weeks

Hello everyone, 

I have a date column in my data source which contains information about Year, Month, Quarter and Day. 

 

I want to build a column chart which the axis is as shown in the picture below. Can anyone tell me how can I create such an axis?

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous  

    Weekend = 'Date'[Date]-MOD('Date'[Date]-1,7)+5
    This gives you a week ending on Friday, adjusting the above inputs would provide you what you need.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous You can create a calculated column. -> 

    MonthDay = FORMAT([Date],"MMMM dd")
    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous 

      Thank you for your reply. I used the formula you mentioned, but what I receive is shown in the picture. It is showing every day of the month, but what I want is that the width of the column to be 7 days, as shown in the picture in the post. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Anonymous  

        Weekend = 'Date'[Date]-MOD('Date'[Date]-1,7)+5
        This gives you a week ending on Friday, adjusting the above inputs would provide you what you need.