Forum Discussion

Narasimha's avatar
Narasimha
Helper I
9 years ago
Solved

Week formats

Hi Team,

 

I want to display the visual like below

Instead of below

I want week starts from Monday to sunday..

How to do the same..

 

Thnaks in advance

 

  • GilbertQ's avatar
    GilbertQ
    9 years ago

    Hi Narasimha

     

    If you go into the Query Editor and then the Date table.

    Click on Add Column in the ribbon and then click on Custom Column, and give it a name.

    Put in the following code below.

     

    Date.ToText(Date.StartOfWeek([Calendar Date], Day.Monday),"MM/dd") & "-" & Date.ToText(Date.EndOfWeek([Calendar Date], Day.Monday),"MM/dd")

    This will then create the column you require.

9 Replies

    • Narasimha's avatar
      Narasimha
      Helper I

      Thanks For the update guavaq..I was created Date table and created relationship b/w date table and our data table. 2nd visual  i was created using date table with below query

      Week1 = CONCATENATE("Week-",WEEKNUM(DimDate[Date],2))

      here in above dax, 2 means week starts from monday..

       

      • GilbertQ's avatar
        GilbertQ
        Super User

        That is great going, do you now have it in the format you require?