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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Is Measure Branching a good idea for report performance

I have avoided using referencing measures inside other measures (Measure branching) because I heard from somewhere that was a bad idea (I don't remember where). But there seems to be a few including Enterprise DNA who think it is a good idea. I couldn't anything official from Microsoft that says this a good for performance. I plan on installing DAX Studio when my IT department adds it to the software whitelist so I can test it myself. But I was hoping to get confirmation from more sources that measure branching is a good idea before using it. 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

It depends 🙂


When you create a measure, it is wrapped in a CALCULATE function. It depends where you want to use it. If you do not need a context transition to happen for example in a row context then do not use measure there. However, Measure Branching, in general, doesn't affect the performance, it will is the same. I heard it from Marco Russo as well. 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

In my opinion, it is not a good idea when it references measures ( or references measures that already referenced other measures) that have ALLSELECTED function as a CALCULATE modifier (inside the CALCULATE function).

I only know the above case that I need to double-check and audit the result of the measure every time.

 

Other than the above, I still need to learn and study whether there are any other cases that make Measure Branching not a good idea.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Fowmy
Super User
Super User

@Anonymous 

It depends 🙂


When you create a measure, it is wrapped in a CALCULATE function. It depends where you want to use it. If you do not need a context transition to happen for example in a row context then do not use measure there. However, Measure Branching, in general, doesn't affect the performance, it will is the same. I heard it from Marco Russo as well. 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

So if I use CALCULATE then don't use that measure in another measure? Do you know where you heard it from Marco Russo? I am only 7 chapters in The Definitive Guide to DAX 2nd edition. I didn't see anything specific for measure branching in the contents. 

@Anonymous 

No, I did not mean that way. You can use a measure inside another measure, all I meant was a measure is always wrapped within a calculate function, so when you use it inside another calculation, it will create context transition. I just stressed this point. So, you can use a measure inside another as long as you are aware of the context. 

The following video explains the nested calculate usage:   @marcorusso 

https://www.youtube.com/watch?v=hZd9EgUR7Do&t=3580s









Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors