Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
Solved! Go to Solution.
@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.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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.
@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.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
47 | |
26 | |
22 | |
17 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |