Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lehmberg
Regular Visitor

Date slicer and page level filter not showing correct information at report load

Hello all,

 

I am using Power BI embedded with direct query to vislualize data in my web app.

I want to have a dashboard containing data from the last 30 days and am running into some problems.

I have created a table in my database with an entry for each day of the year called data. I have also created a measure on that table called days ago looking like this Days Ago = DATEDIFF('Date'[Date],TODAY(),DAY)

I have a slicer on the date field and a Page level filter that says Days Ago >= 0 and Days Ago <= 30

It works in the sense that that date slicer shown the correct date span - the last 30 days - but the rest of the visuals don't reflelct this. They show data form the entire period in the database. Only if I just move the date slider slighty do they refresh to show the correct information.

What can I do so that the data is correct when the page loads?

Best regards

Alex

2 REPLIES 2
v-sihou-msft
Employee
Employee

 

@lehmberg

 

I can't reproduce this issue. Then Page Level Filter and date slicer are applied properly when integrated into my web page.

 

I created a calculated column instead of measure for the date difference.

 

DaysAgo = 1*('Calendar'[Date]-TODAY())

9.PNG

 

 

It shows same thing in my embedded web page.

 

2.PNG

 

Regards,

Thanks for a very elaborate reply - greatly appreciated

 

I checked again and I can get the same behavior you have.

 

The problem comes on tables when you have visualizations on the page that are not using the Date table directly.

I have another table that is linked to my Date table via the Days Ago relationsship and that does not filter based on the date slider until I move the slider and it refreshes the visuals.

I wonder if this can have something to do with the days ago field being a measure.

You can see the two tables and the relationsship here:

https://screencast.com/t/8T6yluGzAI

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.