cancel
Showing results for 
Search instead for 
Did you mean: 

Date slider range does not update as data changes (using direct query)

I have a report embedded in a website using Power BI Embedded (ie. published to an Azure collection and presented with the Javascript client).  It uses a direct query connection to an Azure SQL database.  The report has a filter slider on a transaction date variable.  

 

The issue is the date range of the filter slider is not updating to reflect new dates that are being added to the database.  The maximum end of the slider still reflects that maximum date that was available when the report was published to the Azure collection.  A couple of weeks of newer data has been added since then.  I can see the newer data on other pages of the report which do not have date sliders on them.

 

capture1.PNG

The maximum ActivityDate available right now is 23/04/2017 rather than 12/04/2017.

 

The only way I have found to force the date range to update is to open the source PBIX file, press the refresh button, save the file, and overwrite the existing file in the Azure collection with this new one.

 

Has anyone run into this issue before?

 

Thanks,

Chris

Status: New
Comments
v-haibl-msft
Microsoft

@ChrisS

 

I cannot repro the same issue on my side. The date slicer in my embed report (datasource is Azure SQL DB, direct query mode) can always been updated to new dates added to the db.

 

I suggest you to create a support ticket at http://support.powerbi.com (see bottom of page).
If issue is resolved, you can share the solution here later to help others who have the same problem.

 

 

Best Regards,
Herbert

ChrisS
New Member

Thanks for testing that Herbert; you tipped me off that I'd misdiagnosed the problem. 

 

The root cause appears to be a query that is not behaving as expected.  I'm using Date.IsInPreviousNDays([ActivityDate], 365) to filter a rolling 365 day view of the data.  Unfortunately the behaviour seems to be the 365 days previous from when the refresh button was pressed, rather than from now.

 

I'm interested to see if you are able to recreate it this way.

 

Steps to recreate in Power BI Desktop:

1. Create a Direct Query report and filter a date with Date.IsInPreviousNDays or Date.IsInCurrentDay.

2. Display the max date on the report.

3. Save the PBIX.

4. Open it tomorrow.

You will see that the maximum date will not update until you force a refresh with the refresh button.

 

As a workaround; moving this date filter to a database view resolves the issue.

 

Thanks,

Chris