Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi all,
Im sure this is easy to fix but I am at a loss. See screenshot below, my table is is showing January at the front of the table, rather than after Demeber. I have tried a number of ways to creat a month and year column but nothing seems to be working. FYI our financial year is July-June. The transactions on this report have a date against them, in this format 01/01/2024.
Any help would be greatly recieved.
Thanks
Rosie
Solved! Go to Solution.
Have you tried to create an auxiliar calendar table to get Year-Month?
_Calendar =
var _Init = MIN( Table[DateColumn] )
var _Ending = MAX( Table[DateColumn] )
var _Dates = CALENDAR( _Init , _Ending )
RETURN
ADDCOLUMNS( _Dates,
"DayOfMonth", DAY([Date]),
"DayOfYear", DATEDIFF ( DATE ( YEAR ( [Date] ), 1, 1 ), [Date], DAY ) + 1,
"DayOfWeek", FORMAT([Date], "dddd"),
"IDDayOfWeek", WEEKDAY([Date], 2),
"nWeek", WEEKNUM(''[Date] - 1),
"DayOffset" , INT([Date] - TODAY()),
"IDMonth" , MONTH([Date]),
"Month" , FORMAT([Date], "mmm"),
"Quarter", "Qter. " & FORMAT(ROUNDUP( MONTH([Date]) / 3 ,0),"00"),
"Semester", "Smter. " & FORMAT(ROUNDUP( MONTH([Date]) / 6 ,0),"00"),
"FullYear" , YEAR([Date]) ,
"YearMonth", FORMAT([Date], "mmmm - yyyy"),
"IDYearMonth" , FORMAT([Date], "yyyymm"),
"MonthOffset" ,( (12 * YEAR([Date])) + MONTH([Date]) ) - ( (12 * YEAR(TODAY()) + MONTH(TODAY()))),
"YearOffset" , YEAR([Date]) - YEAR(TODAY())
)
Have you tried to create an auxiliar calendar table to get Year-Month?
_Calendar =
var _Init = MIN( Table[DateColumn] )
var _Ending = MAX( Table[DateColumn] )
var _Dates = CALENDAR( _Init , _Ending )
RETURN
ADDCOLUMNS( _Dates,
"DayOfMonth", DAY([Date]),
"DayOfYear", DATEDIFF ( DATE ( YEAR ( [Date] ), 1, 1 ), [Date], DAY ) + 1,
"DayOfWeek", FORMAT([Date], "dddd"),
"IDDayOfWeek", WEEKDAY([Date], 2),
"nWeek", WEEKNUM(''[Date] - 1),
"DayOffset" , INT([Date] - TODAY()),
"IDMonth" , MONTH([Date]),
"Month" , FORMAT([Date], "mmm"),
"Quarter", "Qter. " & FORMAT(ROUNDUP( MONTH([Date]) / 3 ,0),"00"),
"Semester", "Smter. " & FORMAT(ROUNDUP( MONTH([Date]) / 6 ,0),"00"),
"FullYear" , YEAR([Date]) ,
"YearMonth", FORMAT([Date], "mmmm - yyyy"),
"IDYearMonth" , FORMAT([Date], "yyyymm"),
"MonthOffset" ,( (12 * YEAR([Date])) + MONTH([Date]) ) - ( (12 * YEAR(TODAY()) + MONTH(TODAY()))),
"YearOffset" , YEAR([Date]) - YEAR(TODAY())
)
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |