Forum Discussion

RWWRRW's avatar
RWWRRW
Regular Visitor
3 years ago

Days Beetween deliverydates

I have a table with different order numbers, different materials and different delivery dates.
I would now like to have the number of days of the delivery date per material evaluated. In Excel I had the function Days.
In Power Bi this does not work with Datediff.

How i can solve it via a DAX Formula? A Measure oer a calculated Column?

8 Replies

  • Hello RWWRRW you can use NETWORKDAYS DAX and create a measure and dont forget to mention ALLEXCEPT for the material column so that it will pick days for each material individually.

     

    Your measure should look like this:

    Duration = Calculate(Networkdays(Start_Date,End_Date),ALLEXCEPT(Table_Name, 'Table_Name'[Material_Column]))

     

    This will give you the duration for each material individually. 

     

    If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

  • Please provide more information/sample data. It will matter the days  to compare are in separate tables, different rows, etc.

    • RWWRRW's avatar
      RWWRRW
      Regular Visitor

      Hi

      i have a table with PO/Parts/deliverydate

      29.06.2023 
      6238447471529.06.20230
      6240493505016.06.2023 
      6238006505024.06.20238
      552230505301.06.2023 
      552230505315.06.202314
      552230505329.06.202314
      62404977890220.06.2023 
      62405767890220.06.20230
      62409157890227.06.20237
      • RWWRRW's avatar
        RWWRRW
        Regular Visitor

        sorry i hope this table shows it. I want in Power Bi via Dax calculate the days beetween the deliverdates from each part

        POPartDate LfDdays
        551196471107.06.2023 
        551197471119.06.202312
        82706078471223.06.2023 
        82693981471230.06.20237
        5555125471307.06.2023 
        5555126471322.06.202315
        6238279471529.06.2023 
        6238447471529.06.20230
        6240493505016.06.2023 
        6238006505024.06.20238
        552230505301.06.2023 
        552230505315.06.202314
        552230505329.06.202314
        62404977890220.06.2023 
        62405767890220.06.20230
        62409157890227.06.20237