# Cumulative Total with a measure branched measure that utilises TREATAS

Hello all.
This question comes from reviewing the Enterprise DNA TV tutorial titled “The Ultimate Budget Allocation Methodology for Power BI Analysis”.
I have a question about one of the measures, which was not discussed within the video, but was included within the accompanying tutorial file and used for working out Cumulative Budgets. I have, hopefully, attached the trimmed down tutorial .pbix file.

Can someone please provide a bit more clarity on what’s going on within the formula used within the SUMX statement?
I attempted to understand what was happening by break the formula up into small chunks i.e. step 1 - by creating the SUMMARIZE table as a standalone code, and including it within a CALCULATE measure containing SUMX to see if I could obtain the same Cumulative outcome.
As I expected it does not work i.e. the link to the Product table is severed.

It looks like Sam’s original formula enables everything to be done “virtually”, including reaching back into the Budget Allocation Measure, and enabling the Product slicer to still filter the Cumulative Budgets - but if so how?

So, can someone please explain with a bit more detail regarding the following:
a. the principles being used within the Cumulative Budgets measure e.g. virtual tables, context transition etc.?
b. Please comment also on the purpose of [Budgets] syntax (underlined in red in accompanying image). It looks like it’s a measure but as it does not have the colour Power BI gives measures, so is it a column?

c. Links to other tutorials within the Enterprise DNA portal that hone in on similar combinations of these principles to embed further learning.

I’ll include a number of links below that covers all these techniques in a bit of detail

The idea here is that you need to find a way to work through every single row in a virtual table. This is mainly important usually for the total calculations.

In this case the FILTER and ALLSELECTED part of the formula provide the incorrect context to the calculations after the CALCULATE function so it needs to be fixed within the formula using this SUMX technique.

The [Budgets] part of the formula is a cool trick that allows you to create basicially an interior measure from the virtual table. This can’t be used anywhere else except for within this measure.

Sam

Sam
Many thanks for the prompt response and explanation. These concepts will take a bit of getting used to.
I’ll try and work through the examples shown in the links provided and with a bit of practice I hope things will click into place