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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.