• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Days Between transactions per workorders

bigzolie

New Member
Hello Everyone,
i have a table with 3 column.
work order; item, and date

I need to calculate days between dates for every workorder/item.

Was able to determine item rank under each work order (with dax), but can't figure out how can i calculate days. :(


Attached the base table, so if anyone can help, thank you.
 

Attachments

  • DaysBetween.xlsx
    145.3 KB · Views: 8
I don't think your expected result is correct. And not quite sure of your logic,

But try following calculated column. If this isn't correct, I need bit more detailed explanation of your logic.
Code:
=
VAR _curDate = tbl_orders[EndDate]
VAR _nextDate =
    CALCULATE (
        MIN ( tbl_orders[EndDate] ),
        tbl_orders[EndDate] > _curDate,
        ALLEXCEPT ( tbl_orders, tbl_orders[EndDate], tbl_orders[WorkOrder] )
    )
RETURN
    DATEDIFF ( _curDate, _nextDate, DAY )
 
Back
Top