Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
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
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
Thanks Matt
I will give it a try.
Cheers.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |