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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
boddydan
Frequent Visitor

Create a reference to a dataset

Hi everyone,

I have a dataset which is an SQL table imported via a DirectQuery. I'd like to create a few basic measures based on the imported data (such as adding 10 to each item in a specific column).

My problem is that I'd like to not have to remake my measures when I use different datasets. For example, I could have one dataset per city and I'd like to create the same measures for each city (all of the datasets are in the same format). I don't want to make these measures manually for each (because all measures are the same) so I'm looking of a more modular approach.

 

What I'm thinking is that I create a dataset which contains a reference to my original dataset that I can modify and add measures to. And then when I wish to change the dataset, I can simply change the reference so all of my measures remain, but the reference dataset is different.

 

Is there a way to do this in BI Desktop? Or alternatively is there a better way to achieve what I'm after?

Perhaps I could even have a dataset containing my measures which takes a dataset as an argument? So that my measures (constant functions) output the correct values based upon the input dataset?

 

Any help would be much appreciated,

Many thanks.

1 REPLY 1
Greg_Deckler
Super User
Super User

@boddydan You should be able to create a dataset that is a composite model of the DirectQuery source and some other import Power BI dataset that would just contain your measures: Use composite models in Power BI Desktop - Power BI | Microsoft Docs


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.