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
Crackervich
New Member

DAX help with New Measure

Hi all

I am hoping the helpful folks here can help me, I am having some trouble with; well almost everything if I’m being honest, but particularly with the DAX part of adding a new measure.

I have a column named “Last Service Date” which contains a date value representing the last time a particular piece of equipment was serviced. And another column named “Service Schedule” which contains text “6 months” for example. I would like to add a new column called “Service Due” that will display an amount of days until the next service is due, produced by adding the “Service schedule” to the “Last Service Date” with reference to, today (the “live date”).

So as an example if the Last Service Date was 13/01/2019 and the Service Schedule = 6 months the Service Due column would display 90 days, meaning the next service is due in 90 days (roughly 3 months).

The DAX formula/text I have experimented with is below – sadly it comes as no surprise to me that it doesn’t work as it is a mixture of copying and pasting examples and my novice attempts at what the syntax should be and I would appreciate any advice or assistance.

Apologies for incorrect terminology etc.

 

Capture2.JPG

 

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

Mmmm, sadly - no surprise to me either. I suggest you use Power Query to convert your column “6 months” to “days”.

You could split this column into the integer portion and the “period” portion.

do a replace on “months” with 30, year with 365 and day with 1, then multiple the 2 columns to get the service day’s frequency. 

 

The rest should then be easy 




* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

2 REPLIES 2
MattAllington
Community Champion
Community Champion

Mmmm, sadly - no surprise to me either. I suggest you use Power Query to convert your column “6 months” to “days”.

You could split this column into the integer portion and the “period” portion.

do a replace on “months” with 30, year with 365 and day with 1, then multiple the 2 columns to get the service day’s frequency. 

 

The rest should then be easy 




* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Thanks Matt

 

I will give it a try.

 

Cheers.

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.