The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi!
A couple weeks ago I asked for some advice/help on writing a C# script to create measures based on the calculation items in a data model. I wanted to share what I came up.
There are three files in the zip file:
They can all be executed in Tabular Editor 3 (not sure about TE2...haven't tried it). Execute the two DAX scripts to create those calculation items. Then execute the C# script. It will loop through each of the measures in your model and create a measure based on each of the calculation items. It'll also add formatting and a basic description.
A huge shout out to @parry2k for pointing me in the right direction to get started with this!
Solved! Go to Solution.
Hi @littlemojopuppy ,
Thank you for sharing.it is helpful. You can reply in your own post after and flag it as an answer. This will help more people, many users, who will only view solved cases.
Best Regards,
Lucien
@v-luwang-msft @Do you think this would be better served as a blog post? And not a solution? I didn't actually ask for help with this...
HI @littlemojopuppy ,