Forum Discussion

datanau001's avatar
datanau001
Helper III
5 years ago
Solved

Power BI Desktop - Calculate datediff with information from same column

Hello all, I want to make the datediff with the information from column “change_date_time”. In this column, for each “pair” of lines, I have the time stamp for status queued and time stamp for stat...
  • Fowmy's avatar
    5 years ago

    datanau001 

    You can Pivot the Status Column on the Change Date Time field then add a new field to calculate the difference.

    Select the Status Column, under Transform Tab, click Pivot Column, 
    Under the Value column, Select Change-Date-Time column, Select No Aggregation under Advanced Option.
    now you get two columns ACCEPTED and  QUEUED. select those columns, under Add Columns Tab, select  Time and Subtract.
    You will get a new column with the time difference.

    If you find any difficulties, post a sample data with your reply to demonstrate.

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn