cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marina_oliveira
Frequent Visitor

Table visualization totals

Hello everyone!

I have a column that is the sum (subtraction) of two other columns (Disponível = Estoque - Pedidos). Sometimes, this subtraction is a negative number. My client wants to show zero instead of a negative number (the line must be shown, I can't just filter it). 

I wrote a measure using "if" to do it, but the total of the column also appears as zero (and I understand that, because it follows my measure, if the total is negative, it shows zero after all). The thing is that my client wants the sum of the positive values showing on the total of that column. How do I do that? Can anybody help me?

 

marina_oliveira_0-1673954311694.pngmarina_oliveira_1-1673954341703.png

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @marina_oliveira 
You need to iterate over the matrials:

Disponível (Correct Total) =
SUMX (
    VALUES ( 'Table'[Material] ),
    [Disponível]
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @marina_oliveira 
You need to iterate over the matrials:

Disponível (Correct Total) =
SUMX (
    VALUES ( 'Table'[Material] ),
    [Disponível]
)

Thank you! it worked perfectly!

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors