Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have a Calendar Table that I just made in DAX via the CALENDAR function.
I'd like to add an Index column to it - just a 1,2,3,4, etc. Since I made it in DAX, and not Power Query, there's no ready-made way to do this. What would be the easiest way to do it in DAX?
Solved! Go to Solution.
Try the below DAX in New Column.
Row Index Column =
CALCULATE(
COUNTROWS(TCalendar),
FILTER(All(TCalendar), TCalendar[Date] <= EARLIER(TCalendar[Date]))
)
Hope this helps.
If this solves your problem please mark as solution.
Great solution, I want to share all the code and how I managed to index Year/Month:
Try the below DAX in New Column.
Row Index Column =
CALCULATE(
COUNTROWS(TCalendar),
FILTER(All(TCalendar), TCalendar[Date] <= EARLIER(TCalendar[Date]))
)
Hope this helps.
If this solves your problem please mark as solution.
That's a nice way to do it - thanks!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
86 | |
85 | |
68 | |
67 | |
63 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |