Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Column Chart X-Axis Date Formatting to Weekend date

I've created a weeknumber use below calculation, the chart now give me the value in week 1 and week2, is there anyway i can change them to weekending date, for example, 1 to be 7/01/2017 and 2 to be 14/1/2017? 

 

WeekNum = WEEKNUM(mag_pledgeSet[mag_EstablishedDate].[Date])

 

  • Hi Anonymous,

     

    In your scenario, you can create a Calendar table and build a relation between Fact table and Calendar table use date. Then create a calculated column in Fact table like below:

     

    LastDayofWeek = CALCULATE( MAX( 'Calendar'[Date] ), FILTER( ALL( 'Calendar' ), 'Calendar'[weenum]= EARLIER( 'Fact'[WeekNum] ) ))

     

     

    Best Regards,
    Qiuyun Yu

7 Replies

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi Anonymous,

     

    In your scenario, you can create a Calendar table and build a relation between Fact table and Calendar table use date. Then create a calculated column in Fact table like below:

     

    LastDayofWeek = CALCULATE( MAX( 'Calendar'[Date] ), FILTER( ALL( 'Calendar' ), 'Calendar'[weenum]= EARLIER( 'Fact'[WeekNum] ) ))

     

     

    Best Regards,
    Qiuyun Yu

      • Anonymous's avatar
        Anonymous
        Not applicable

        v-qiuyu-msftHow can you get the "07 Jan" but my was on "8/January"  the best i can do on data "format"