Power Query formula to get the Today and Yesterday Sale values

Below formulas can be used to get only the Today and Yesterday Sale value in columns

Today Sale value:
TodaySale = if [Date]=  DateTime.Date(DateTime.LocalNow()) then [SaleValue] else null

Yesterday Sale value:
YesterdaySale = if [Date]=  Date.AddDays(DateTime.Date(DateTime.LocalNow()),-1) then [SaleValue] else null

Hope this will be helpful.

No comments:

Post a Comment

tablename_WriteToDataDestination: Mashup Exception Data Source Error Couldn't refresh the entity...

 Once a Dataflow is created and published on Fabric, got the below error while refreshing the Dataflow. tablename_ WriteToDataDestination: M...