Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi every one,
I have a report showing 3 days operation, yesterday, Today, and tomorrow, but the on Sunday the bigging of the week I need this report to show Thursday, Friday, and Saturday, and this is only on sunday
Can someone advise how to do this??
this what I have done so far:
if [Oper.Date UTC] = DateTime.Date(DateTime.LocalNow()) then "Today"
else if [Oper.Date UTC] = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-1)) then "Yesterday"
else if [Oper.Date UTC] = DateTime.Date(Date.AddDays(DateTime.LocalNow(),+1)) then "Tomorrow"
else if [Oper.Date UTC] = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-2)) and [Oper.Date UTC] = Day.Sunday then "Friday"
else if [Oper.Date UTC] = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-3)) and [Oper.Date UTC] = Day.Sunday then "Thursday"
else null
Solved! Go to Solution.
Use this
= if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))="Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-1)) then "Saturday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))="Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-2)) then "Friday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))="Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-3)) then "Thursday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))<>"Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(DateTime.LocalNow()) then "Today" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))<>"Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-1)) then "Yesterday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))<>"Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),+1)) then "Tomorrow" else
null
Use this
= if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))="Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-1)) then "Saturday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))="Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-2)) then "Friday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))="Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-3)) then "Thursday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))<>"Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(DateTime.LocalNow()) then "Today" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))<>"Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),-1)) then "Yesterday" else
if Date.DayOfWeekName(DateTime.Date(DateTime.FixedLocalNow()))<>"Sunday" and Date.From([Oper.Date UTC]) = DateTime.Date(Date.AddDays(DateTime.LocalNow(),+1)) then "Tomorrow" else
null
Thanks for your help
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
35 | |
17 | |
12 | |
11 | |
9 |
User | Count |
---|---|
45 | |
27 | |
16 | |
14 | |
13 |