Forum Discussion
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
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.
2 Replies
- Greg_Deckler
Community Champion
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.
- StuartSmith
Power Participant
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.