1

Is it possible to have a custom start and end date parameter on a report? I would like to have a regular daily report for the week,Tuesday through Friday where the parameter could be today()-1. However , when I run the Monday report I need a start date to be variable because I want it to pull Friday's data.

In other words, on a Monday, report pulls data from last Friday ;

on a Tuesday, report pulls data from Monday,

on a Wednesday, Tuesday, etc,

until on Friday, the report pulls data from Thursday.

Please assist,

Vava

Vava
  • 13
  • 3

1 Answers1

0

You can calculate different offsets for different days of the week. I'd suggest creating a date parameter query along these lines:

let
    Today = DateTime.Date(DateTime.LocalNow()),
    Offset = if Date.DayOfWeek(Today) = 1 then -3 else -1,
    Result = Date.AddDays(Today, Offset)
in
    Result
Alexis Olson
  • 38,724
  • 7
  • 42
  • 64