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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Need help to write m code

i need to write the m code

my requirement is, i need to create parameters for start year and end year, start month and end month,start week and end week, start date and end date.

if user has selected start week and end week, and not selected year, month and date filter. it automatically take current week of the year. if user has selcte june month not slected other parameters it should take current month of year(june, 2022). Please help how to to write the code. 

i have attached scrrenshots which i have created for week. I have start week and end week parameter. and passed parameter to direct query(query). After publishing the report  in service, I can change paramters dynamically. like i need for year and month and date should include all four (year, month, week, date) be there  If i select only start month and end month parameter only and  user havn't selected anything. it should automatically take current year month) . iam not able attach sample file.so i attcahed screenshot.

Kindly help to write accordingly.

 

swathi1997_0-1660739854412.png

swathi1997_2-1660739921994.png

swathi1997_3-1660740004042.png

 

swathi1997_1-1660739889521.png

 

 

@amitchandak 

1 REPLY 1
lbendlin
Super User
Super User

Helpful resources

Announcements
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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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