Forum Discussion
hobbssj
5 years agoRegular Visitor
Trouble with calculated date column
Hello, I'm trying to add a column to use in a visual. The column will be displaying one of two options if the date in the "modidate" is 3 days prior to the current date. The modidate contains...
- 5 years ago
Hi, hobbssj
You need to modify your code,Like this:
= Table.AddColumn(#"Sorted Rows1", "ticketupdated", each if Date.From([date])>=Date.AddDays( Date.From(DateTime.LocalNow()),-3) and Date.From([date])<Date.From(DateTime.LocalNow()) then true else false)If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-janeyg-msft
5 years agoCommunity Support
Hi, hobbssj
You need to modify your code,Like this:
= Table.AddColumn(#"Sorted Rows1", "ticketupdated", each if Date.From([date])>=Date.AddDays( Date.From(DateTime.LocalNow()),-3) and Date.From([date])<Date.From(DateTime.LocalNow())
then true
else false)If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hobbssj
5 years agoRegular Visitor
Just a quick update, we ended up getting our DBA to create a custom view on on the database.
but I testted the Janey's soltuion and that worked as well
Thanks for everyone help