Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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])
Solved! Go to Solution.
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
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
@v-qiuyu-msftHow can you get the "07 Jan" but my was on "8/January" the best i can do on data "format"
Hi @Anonymous,
Please check how you create a calculated column to return weeknum both in Fact and Calendar table. I guess the issue should be related to WeekNum() function: WEEKNUM(<date>, <return_type>) .
Return type: 1, week begins on Sunday.
Return type: 2, week begins on Monday.
Please download attached in my previous post and compare it with your report.
Best Regards,
Qiuyun Yu
@v-qiuyu-msft it works, i used "2" week begins on Monday. it just my format is diffent from yours, and i prefer it's in short. which is 7 Jan (on yours) not 7/January (on mine). just wonder how you set your data format, i've tried them all already.
Hi @Anonymous,
I'm running Power BI desktop latest version 2.42.4611.701 and just set format like below:
Best Regards,
Qiuyun Yu
@v-qiuyu-msfti've changed format like yours, the "Digital" now correct but not the "F2F" do you know why? plus i've checked the dates for F2F, there is no 10 Jan and 12 Jan dates.