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
StuartSmith
Power Participant
Power Participant

What's more efficient - Multiple Linked Measures OR One Measure with Variables.

As the title says, whats the best practice /most efficient...

 

Multple Measures referencing each other to get the end result.  This option, you have multiple measures to manage and keep track of.

or

One Measure using multple Var's to get the end result. Obviously, with this approach, you only have one measure, so easier to manage

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@StuartSmith There are advantages/disadvantages to both. I would say that the "enterprise" best practice is multiple measures. But, for 80%-90% of the Power BI folks out there, I would say that single measures are preferred. Multiple measures make debugging an absolute nightmare. For the majority of the work I do, I use single measures. I *get* the "code reusability/maintainability" of having a single definition for things but for the vast majority of cases, so what if you have SUM('Table'[Column]) in 10 or 12 different places. If Microsoft would just allow us to have a measure return a table, then I would use the multiple measure approach more often, having intermediate measures that returned certain base filtered tables.


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

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@StuartSmith There are advantages/disadvantages to both. I would say that the "enterprise" best practice is multiple measures. But, for 80%-90% of the Power BI folks out there, I would say that single measures are preferred. Multiple measures make debugging an absolute nightmare. For the majority of the work I do, I use single measures. I *get* the "code reusability/maintainability" of having a single definition for things but for the vast majority of cases, so what if you have SUM('Table'[Column]) in 10 or 12 different places. If Microsoft would just allow us to have a measure return a table, then I would use the multiple measure approach more often, having intermediate measures that returned certain base filtered tables.


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

Thats, thats what I am finding, the more measures you create referencing other measure, it becomes a spiders web and becomes unmanagable and untidy.  I have started trying to create a single measure with vars to try and keep things neat, but was just curious as to what other people are doing.

 

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.