Forum Discussion
Convert Python script to DAX - Conditional Accumulated
Hi VilmarSch ,
Based on my testing, please try the following methods:
1.Create the simple table.
2.Create the measure to calculate saldo.
Saldo =
VAR sal = 0
VAR entra = CALCULATE(SUMX('Table', 'Table'[Entrada]))
VAR sasi = CALCULATE(SUMX('Table', 'Table'[Saida]))
RETURN
MAX(0, 0 + entra - sasi)
3.Drag the measure into the table visual, the result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- VilmarSch2 years ago
Post Partisan
Anonymousthanks for the answer, but it didn't give the expected result. I believe it is something more complex.
- Anonymous2 years agoNot applicable
Hi VilmarSch ,
May be you can try to use power query.
Solved: Do Not Consider If Accumulated Value Is Negative P... - Microsoft Fabric Community
Best Regardsd,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- VilmarSch2 years ago
Post Partisan
AnonymousI saw this topic, but I really needed to do it in DAX