Forum Discussion

Jan845's avatar
Jan845
Icon for Helper I rankHelper I
4 years ago
Solved

Power Bi How to Calculate Values based on condition

Hi Power BI Community Support,

 

I am new to the power bi looking for support for the below problem statement.

 

This is a semple of my table:

 

CallsTime 
Delivered30
Abandoned15
Abandoned25

 

so I need to sum column *(Time ) when Abandoned I tried it:

 

IF
(
VALUES('Table1'[Calls]) = "Abandoned",
SUM([Time] )
)
 

I hope the problem statement is clear and looking forward support.

thanks!

  • This is generally done with filters like this:

    CALCULATE ( SUM ( 'Table1'[Time] ), 'Table1'[Calls] = "Abandoned" )

4 Replies

  • This is generally done with filters like this:

    CALCULATE ( SUM ( 'Table1'[Time] ), 'Table1'[Calls] = "Abandoned" )
  • Hi:

    Do you have any particular figures? In general, if you look at the file in this link (very basic) it shows a calculated column in the table CityRev. That has conditions. Those are to add up up the sales in that particular city on any particular day.

     

    The is also a measure named Ciy 1 Sales , that has a condition too. It is taking the [Total Sales] measure and applying a condition to it that says only calculated total sales for the City coded 1.

     

    Does this help?