Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Digger99
Regular Visitor

Re-ordering Stock Date Format

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.

 

Digger99_0-1678876606587.png

 

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.

 

Digger99_1-1678876987927.png

 

Any assistance on this will be appreciated!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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 )

vpollymsft_0-1679019346133.pngvpollymsft_1-1679019355354.png

 

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.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

All good, you only need to change it to D2-C2

Anonymous
Not applicable

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 )

vpollymsft_0-1679019346133.pngvpollymsft_1-1679019355354.png

 

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.