Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am trying to work out when the best time is to re-order my stock, in a date format.
Below is a screenshot from the data I'm working with. There is a Product (ID & Name), Stock on Shelf - how many months left i have with this item having stock on the shelf (calculated by looking at historical sales), Lead Time - how long it will take in months for the product to be delivered.
I am trying to calculate the date of when i should put my next order in for each item. And this is the format i'd like it to be shown in PBI (see below. The EDATE function is what i thought would work but in DAX i am getting errors.
Any assistance on this will be appreciated!
Solved! Go to Solution.
Hi @Digger99 ,
I have creatd a simple sample, please refer to my pbix file to see if it helps you.
Create a column.
Column =
VAR _1 = 'Table'[stock on shelf] - 'Table'[lead time]
RETURN
EDATE ( TODAY (), _1 )
Or a measure.
Measure =
VAR _1 =MAX( 'Table'[stock on shelf] )-MAX( 'Table'[lead time])
RETURN
EDATE ( TODAY (), _1 )
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
All good, you only need to change it to D2-C2
Hi @Digger99 ,
I have creatd a simple sample, please refer to my pbix file to see if it helps you.
Create a column.
Column =
VAR _1 = 'Table'[stock on shelf] - 'Table'[lead time]
RETURN
EDATE ( TODAY (), _1 )
Or a measure.
Measure =
VAR _1 =MAX( 'Table'[stock on shelf] )-MAX( 'Table'[lead time])
RETURN
EDATE ( TODAY (), _1 )
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
21 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |