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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

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.

Top Solution Authors