The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I would like to be able to subtract or add a # of days from a date field in the query editor. In one column I have number of days (5,300, 60) and in another column i have dates 01/01/2018. Is there a custom column function that will subtract or add?
Example...... 01/01/2018 + [Date Field] (5) = 01/06/2018
Thanks!
Solved! Go to Solution.
@Anonymous,
Change the data type if necessary.
Date.AddDays(Date.From([Start Date]), Number.From([Promote_or_Defer__c]))
Yes: Date.AddDays.
When I use the formula for dateadd it doesn't do the calculation.
Date.AddDays([Start Date], [Promote_or_Defer__c])
@Anonymous,
Change the data type if necessary.
Date.AddDays(Date.From([Start Date]), Number.From([Promote_or_Defer__c]))
let Source = #table(type table[Start Date = date,Promote_or_Defer__c = Int64.Type], {{#date(2017,12,18),-10},{#date(2017,12,18),10}}), #"Added Custom" = Table.AddColumn(Source, "Resulting Data", each Date.AddDays([Start Date],[Promote_or_Defer__c]), type date) in #"Added Custom"
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
101 | |
95 | |
80 | |
62 | |
56 |
User | Count |
---|---|
252 | |
121 | |
112 | |
81 | |
70 |