Forum Discussion
ruinaldo
Helper II
5 years agoMeasure to sum with left function and only negatives values by row
i have a table named "Tabela" I want to do a measure that sum only negative rows, that starts with 24 and conta movimento is yes. I tried this measure but don“t work. How c...
- 5 years ago
Hi ruinaldo
Measure = SUMX ( CALCULATETABLE ( DISTINCT ( Tabela[Conta] ), Tabela[Conta movimento] = "Yes", Tabela[Saldo] > 0, LEFT ( Tabela[Conta], 2 ) = "24" ), CALCULATE ( SUM ( Tabela[Saldo] ) ) )Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- Anonymous5 years ago
Hi ruinaldo ,
Based on your description, you can create a measure as follows.
_sum =SUMX(FILTER('Sheet1',LEFT('Sheet1'[Conta],2)="24"&&[conta]=SELECTEDVALUE('Sheet1'[conta])),[Saldofinal])Result:Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlB
Community Champion
5 years agoHi ruinaldo
Measure =
SUMX (
CALCULATETABLE (
DISTINCT ( Tabela[Conta] ),
Tabela[Conta movimento] = "Yes",
Tabela[Saldo] > 0,
LEFT ( Tabela[Conta], 2 ) = "24"
),
CALCULATE ( SUM ( Tabela[Saldo] ) )
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers