Forums
Selectable Date Range for Report
Hi guys,
I have a client who requires the ability to choose the date range for the data returned in a report. Basically they want start and end date report parameters that they can select dates in, and when they click View Report should only see data within that range. Their database is hosted on the cloud servers, so I need to use the API to draw the data. I am using Power Bi’s Report Builder to generate the paginated report.
I have been able to draw the data for the next 12 months using the following in my criteria:
{
""Udf/$NAME(Milestone 1\\M1 - Invoice Date)"": {
""$RANGE"": [
""$THISMONTH()"",
""$OFFSET(M+11,$THISMONTH())""
]
}
}
However what they want is something like:
{
""Udf/$NAME(Milestone 1\\M1 - Invoice Date)"": {
""$RANGE"": [
""@StartDate"",
""@EndDate""
]
}
}
@StartDate and @EndDate above referring to the Start and End Date Parameter in the paginated report. I can do this kind of thing easily if I’m drawing the data directly from the SQL database, but is it possible to do this via the API?
