Forum Discussion

allawr's avatar
allawr
Icon for Microsoft Employee rankMicrosoft Employee
9 years ago
Solved

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

3 Replies