Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a hire date column and would like to have a new custom column that has the formula:
Todays Date - Hire Date.
I can get this to work. Obviously I am using the field names and the columns have the same data type
Thanks
Solved! Go to Solution.
Hi @sgp1066
Based on your description, I create the following sample data, its data type is date.
Then create a custom column, it returns the days between hire date and today.
DateTime.Date(DateTime.LocalNow())-[Hire Date]
Then change its type to whole number.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
And you can refer to the following attachment.
Thanks for the quick reply. I thought I was on the right track but got caught up in that whole dateTime.Date expression. Thanks also for the complete solution with the nice screen shots and explanations.
-steve
Hi @sgp1066
Based on your description, I create the following sample data, its data type is date.
Then create a custom column, it returns the days between hire date and today.
DateTime.Date(DateTime.LocalNow())-[Hire Date]
Then change its type to whole number.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
And you can refer to the following attachment.