Forum Discussion

jeffr6596's avatar
jeffr6596
Frequent Visitor
1 year ago
Solved

Multi step measure

I am attempting to write a measure and would appreciate assistance.

 

I have a table with columns for 

Submitted Date

Due Date

I have added a column with the measure written to determine if the items were submitted on time. 

ON TIME = IF(DATEVALUE([Date Submitted]) <= [Due Date], "On Time", "Late")
 
I also have columns for 

Number of Contacts Required

Number of Contacts Made

 

I am attempting to write a measure which will calculate the sum of Number of Contacts Made only if the item was on time.

Is there a way to do this?

Thanks 

  • You can create a measure like

    Contacts made on time =
    CALCULATE (
        SUM ( 'Table'[Number of contacts made] ),
        'Table'[On time] = "on time"
    )
    
  • jeffr6596 Yes, you can achieve this by creating a measure that sums the "Number of Contacts Made" only for the items that were submitted on time

     

    DAX
    SumOfContactsMadeOnTime =
    CALCULATE(
    SUM('YourTable'[Number of Contacts Made]),
    'YourTable'[ON TIME] = "On Time"
    )

2 Replies

  • You can create a measure like

    Contacts made on time =
    CALCULATE (
        SUM ( 'Table'[Number of contacts made] ),
        'Table'[On time] = "on time"
    )
    
  • jeffr6596 Yes, you can achieve this by creating a measure that sums the "Number of Contacts Made" only for the items that were submitted on time

     

    DAX
    SumOfContactsMadeOnTime =
    CALCULATE(
    SUM('YourTable'[Number of Contacts Made]),
    'YourTable'[ON TIME] = "On Time"
    )