Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello!
I am working in the query editor and looking to have a custom column as specified below ...
| Date | # Days (Whole number data type) | NEW CUSTOM COLUMN |
| 1/10/2020 | 1 | 1/9/2020 |
| 1/10/2020 | 2 | 1/8/2020 |
| 1/10/2020 | 3 | 1/7/2020 |
As you can see in my example table, I would like to subtract the number of days from the # Days column from the date column to output the new custom column. I am looking for code that translates that whole number into a days format so it can be properly subtracted.
I would appreciate any help! Thank you in advance!
Solved! Go to Solution.
Hi @Anonymous ,
Try this:
Did I answer your question? Mark my post as a solution!
Ricardo
As an alternative to the above, setting the 'data type' of the column holding the number of days to 'Duration' allows it to be used in a Custom Column, with a simple Date column + or - Duration Column formula.
This worked for me and is very simple. Thanks!
Amazing! Thank you very much!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.