Forum Discussion
Calculate intervall off orders
- Anonymous4 years ago
Hi Marcus_S ,
My table is :
You can follow the below steps:
1.Add a new column in the table to calculate the datediffDate_Diff = VAR curdate = 'Table'[Order date] VAR prevoius_date = CALCULATE ( MAX ( 'Table'[Order date] ), FILTER ( 'Table', 'Table'[Order date] < curdate ) ) RETURN DATEDIFF ( prevoius_date, curdate, DAY )2.Create a measure to calculate the average about the new added column
Measure = AVERAGE ( 'Table'[Date_Diff] )If I misunderstand your demands, please feel free to let me know.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Marcus_S ,
My table is :
You can follow the below steps:
1.Add a new column in the table to calculate the datediff
Date_Diff =
VAR curdate = 'Table'[Order date]
VAR prevoius_date =
CALCULATE (
MAX ( 'Table'[Order date] ),
FILTER ( 'Table', 'Table'[Order date] < curdate )
)
RETURN
DATEDIFF ( prevoius_date, curdate, DAY )
2.Create a measure to calculate the average about the new added column
Measure =
AVERAGE ( 'Table'[Date_Diff] )
If I misunderstand your demands, please feel free to let me know.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.