Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have created a date table using the code below.
Accounting_Posting_Date =
ADDCOLUMNS (
CALENDAR (DATE(2015,1,1), DATE(2030,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Period", FORMAT ( [Date], "YYYYMM" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)
"RANK_" = -Accounting_Posting_date[Period]
thanks!
Solved! Go to Solution.
I've managed to solve it by adding the column directly when creating the table and then referring to it when sorting the other columns
I've managed to solve it by adding the column directly when creating the table and then referring to it when sorting the other columns
you should create an index and then sort you "Period" column by the index.
Try to sort it by "Month Number" and see what happens.
thanks @Uspace87
Can I do this in DAX?
the few examples that I've tried also gave me the circular dependency error
you don't need to do it in dax.
In you calendar table just sort you "Period" column by "Month_Year". The first time it will do it descending and the ascending or the other way around.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
12 | |
11 | |
10 | |
9 |