Forum Discussion

PowerBIUser9901's avatar
PowerBIUser9901
Advocate II
7 years ago
Solved

DateDiff with repeating Order ID's

Hi, I’m looking to calculate the difference between two dates in Power BI. I’m aware this is possible with DATEDIFF in DAX however the data I have contains repeating Order ID’s for each Product assoc...
  • v-eachen-msft's avatar
    7 years ago

    Hi PowerBIUser9901 ,

     

    You need to create a new measure:

    NetAvg =
    AVERAGEX (
        VALUES ( 'Table'[Order_ID] ),
        CALCULATE ( AVERAGE ( 'Table'[Column] ) )
    )

     

    Best Regards,

    Eads

     

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