Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I'm currently developing a cash flow matrix and failed while trying to merge two measures in one (running totals and sum):
My idea was to add boolean indicators (Calculado Column) as such:
So that my measure could do the following:
Subtotal =
var Calculado = SELECTEDVALUE('Categorias'[Calculado])
var Runningtotal= [Running total]
Return
SWITCH(
True(),
Calculado = 0, [Total],
Calculado = 1, Runningtotal,
BLANK()
)
The referenced measures are:
Running total =
CALCULATE(
[Total],
FILTER(
ALLSELECTED('Calendário'[Data]),
ISONORAFTER('Calendário'[Data], MAX('Calendário'[Data]), DESC)
)
)
The [Total] measure:
[Total] = SUM(Movimentacoes[nValorTitulo])When [Running Total] is in a matrix by itself it works absolutely fine, also does [Total], however if I mix both using the [Subtotal] measure, the [Running Total] results in 0 and the sum measure [Total] works just fine.
Solved! Go to Solution.
Managed to fix it:
Had to add an Index column and edit the measure:
Subtotal =
var Calculado= SELECTEDVALUE(Categorias[Calculado])
var ordemContexto = Max('Categorias'[Índice])
var ValorSubtotalresumo =
CALCULATE([Running Total],Filter(ALLNOBLANKROW('Categorias'), 'Categorias'[Índice] >= ordemContexto))
Return
SWITCH(
True(),
Calculado = 0, [Total],
Calculado = 1, ValorSubtotalresumo,
BLANK()
)
Managed to fix it:
Had to add an Index column and edit the measure:
Subtotal =
var Calculado= SELECTEDVALUE(Categorias[Calculado])
var ordemContexto = Max('Categorias'[Índice])
var ValorSubtotalresumo =
CALCULATE([Running Total],Filter(ALLNOBLANKROW('Categorias'), 'Categorias'[Índice] >= ordemContexto))
Return
SWITCH(
True(),
Calculado = 0, [Total],
Calculado = 1, ValorSubtotalresumo,
BLANK()
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 57 | |
| 52 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 112 | |
| 108 | |
| 39 | |
| 34 | |
| 27 |