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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Using Power Query M Code to create a Fiscal Calendar in Visual Studio

HI,

I am trying to create a Fiscal Calendar in Power BI, we are using Direct Query and my Calendar is written in M code. I cannot create it in Visual Studio for Analysis services as there is no underlying Data Source. I have been trying to append my M code (for the Calander) into the M code for a Date Dimension Object.

Any help with trying to merge the two so I can use my Calendar in Power BI Reports?

Or any other way to create a Fiscal calander in Visual Studio /Analysis services.

tia

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Please see if this document can help:

How to: Programmatically create a custom calendar - Visual Studio (Windows) | Microsoft Learn

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.

Top Solution Authors