Forum Discussion

AtchayaP's avatar
AtchayaP
Icon for Helper V rankHelper V
4 years ago
Solved

DAX

I have 2categories like male and female I have 4columns(date created, date closed, time created, time closed.

 

  • Hi AtchayaP 

     

    You could use a measure like this to give you total time spent.

    Time Spent = 
    SUMX(
        'Table', 
        DATEDIFF(
            'Table'[date created] + 'Table'[time created],
            'Table'[date closed] + 'Table'[time closed], 
            MINUTE
        )
    )

    Visualised in a pie chart by type, for example, would give you

     

2 Replies

  • Hi AtchayaP 

     

    You could use a measure like this to give you total time spent.

    Time Spent = 
    SUMX(
        'Table', 
        DATEDIFF(
            'Table'[date created] + 'Table'[time created],
            'Table'[date closed] + 'Table'[time closed], 
            MINUTE
        )
    )

    Visualised in a pie chart by type, for example, would give you