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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Struggling to Convert Python into M!

Hi PBI friends! Looking for some help on how to convert a chunk of python code into M given that i cannot run python scripts in our PROD environments. 

1 REPLY 1
HotChilli
Super User
Super User

You are starting with one row and want to end up with 11?

This will be based on adding a custom column in the form {[columnA]..[columnB]} which gives a list which can be expanded to new rows.

You can round your column using Number.RoundDown or Number.RoundUp

I think you'll need to define your rules and work out test cases because in the example starting at 0 and going to 11 will give you 12 rows.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.