Forum Discussion
What-if Analysis with date fields
- Anonymous2 years ago
Hi fz1 ,
Please try below steps:
1. Create a date table and create a slicer with date field
2. Calculate Average Lead Time
Average Lead Time = AVERAGE('YourTable'[LeadTimeColumn])Replace 'YourTable' and 'LeadTimeColumn' with the actual names from your dataset.
3. Create a Measure for "Purchase Order Date"
Purchase Order Date = DATEADD( SELECTEDVALUE('YourParameter'[DateValue]), -1 * [Average Lead Time], MONTH )This formula assumes the lead time is in months. Adjust accordingly if your lead time is in a different unit.
4. Visualize the "Purchase Order Date": Finally, use a Card or Table visual to display the "Purchase Order Date" measure. As the user adjusts the "Need to Receive By" date parameter, the visual will update to show the calculated "Purchase Order date".
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 fz1 ,
Please try below steps:
1. Create a date table and create a slicer with date field
2. Calculate Average Lead Time
Average Lead Time = AVERAGE('YourTable'[LeadTimeColumn])
Replace 'YourTable' and 'LeadTimeColumn' with the actual names from your dataset.
3. Create a Measure for "Purchase Order Date"
Purchase Order Date =
DATEADD(
SELECTEDVALUE('YourParameter'[DateValue]),
-1 * [Average Lead Time],
MONTH
)
This formula assumes the lead time is in months. Adjust accordingly if your lead time is in a different unit.
4. Visualize the "Purchase Order Date": Finally, use a Card or Table visual to display the "Purchase Order Date" measure. As the user adjusts the "Need to Receive By" date parameter, the visual will update to show the calculated "Purchase Order date".
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.