Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am working with a Conditional Column and I want to make the Date Current Date +28 Days instead of hard coded below
= Table.AddColumn(#"Filtered Rows", "Custom Order Finish Date", each if [Ordfinish] >= #date(2022, 7, 28) then "TBD" else [Ordfinish])
Solved! Go to Solution.
Replace #date(2022, 7, 28) with
Date.AddDays(Date.From(DateTime.FixedLocalNow()),28)
DateTime.LocalNow()
and
Date.AddDays()
are the 2 functions you need
Add 28 days to:
Date.From(DateTime.LocalNow())
- https://docs.microsoft.com/en-us/powerquery-m/date-adddays
- https://docs.microsoft.com/en-us/powerquery-m/datetime-localnow
Replace #date(2022, 7, 28) with
Date.AddDays(Date.From(DateTime.FixedLocalNow()),28)
Thanks this worked
User | Count |
---|---|
8 | |
6 | |
6 | |
5 | |
5 |
User | Count |
---|---|
9 | |
8 | |
6 | |
6 | |
6 |