Forum Discussion
Copying measures across tables
I have a collection of about 15 tables (in SQL database FWIW), each has the same ~~15 metrics, but different dimensions. I import the tables into PowerBI (15 queries, straightforward).
Then, on one table, I define 15 measures, which tell PowerBI how to properly aggregate the metrics (weighted average - SUMX(<tablename>,[count]*[<metric>])/SUM([count]), for each <metric>).
Now, I want to copy those same measures and put them on each of the other tables. (1) Seems I have to enter all 15 measure formulae again by hand (well I can copy/paste individually but that's about it). (2) I have to use different names for the measures on each table.
Is there something I'm missing here? Can I have a measure that's parameterized by / a function of which table to apply it to, or something like that? Maintaining 15 copies is going to be a real headache. Otherwise I am having to merge all the tables together to make one super-table in PowerBI, which probably works but is quite messy...
- Anonymous9 years ago
Hi allawr,
Agree with ankitpatira. An idea about copying measures in Power BI has been submitted in the following link, please vote it.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13219620-duplicate-measure-and-format-copy
Thanks,
Lydia Zhang
3 Replies
- AnonymousNot applicable
Hi allawr,
Agree with ankitpatira. An idea about copying measures in Power BI has been submitted in the following link, please vote it.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13219620-duplicate-measure-and-format-copy
Thanks,
Lydia Zhang- AnonymousNot applicable
https://www.microsoft.com/store/apps/9N60JMZCMCHC
You could keep measures as excel list and inside that copy past with unique names per tables then insert to all tables with the tool
Best
- ankitpatira
Community Champion
allawr Unfortunately not i don't think you will be able to get measures created across all the tables automatically. Since via query editor you can't create measures or don't get access to them (only via Modelling tab) you can't parameterise them or create a function for them. So manually creating them is your only option I think.