Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GAPER
Post Patron
Post Patron

XIRR Formula

I know that the XIRR formula is using the date column 

 

XIRR(<table>, <values>, <dates>, [, <guess>[, <alternateResult>]])

 

if there a way i can reorder the dates in to a order I want? Because for my XIRR formula, it will not generate results if i the date order is ascending. 

 

Thanks

1 REPLY 1
amustafa
Solution Sage
Solution Sage

Well, one way to do this is to create a custom sort order column in your table and then use it in XIRR. Here's a sample in how to create a DAX calculated column.

 

CustomSortOrder =
SWITCH([Date],
DATE(2024,1,1), 1,
DATE(2024,1,2), 2,
DATE(2024,1,3), 3,
// Add more dates and corresponding numbers as needed
BLANK()
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.