Forum Discussion
Creating Measures in Tabular Editor With C Sharp Scripts
- 3 years ago
littlemojopuppy I'm sure this will get you going. GitHub - TabularEditor/Scripts: Community repository for sharing and discussing scripts for use with Tabular Editor
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
I don't know enough C# to help easily. One question though. If you already have the base measures and your new calculation items, why can't you bulk delete all the bad measures in TE? You would then have the base measures and the ~25 calc items to be used with each.
Or are you saying that all reports are built and you need to update all those measures with the below?
CALCULATE([Base Measure], CalcGrp[Name] = "CalcItem")
Pat
- littlemojopuppy3 years agoCommunity Champion
Hi mahoneypat I need them to be available for users. And I don't want to have to manually correct or recreate 40% of 2400 measures.
I'd actually prefer to delete all the measures and recreate them via script so they use the calculation groups/items. That way (hypothetically) if the company adopted a new fiscal year, I'd only have to change it once and not find every measure where YTD is calculated.