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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
pb123
Frequent Visitor

Excluding data from visual based on date range

Hello,

 

I have a some measuyres which calculates the moving average of a sum of values in my table each day in a specified year (related to a date table), but when I move the date filter, I get a static line for values outside of my date range.

 

pb123_0-1659521107486.png

 

My goal here is to be able to have another measure which is the average on each day for all the years selected, but excluding the periods filtered out.

 

I know that if I simplify this into one measure which is not filtered by year I can get something like the below, but then from what I understand I am then not able to create an average line of all the years to display on the same chart.

pb123_2-1659521432352.png

 

Does anyone know how I can exclude those those static values in the fisrt picture (i.e. treat them as blank/null) so that I can achieve the result in the second picture AND be able to show an average line on top of that?

 

Hope is clear, many thanks!

 

1 REPLY 1
v-xiaotang
Community Support
Community Support

Hi @pb123 

Thanks for reaching out to us.

>> but when I move the date filter, I get a static line for values outside of my date range....My goal here is to be able to have another measure which is the average on each day for all the years selected,.....

How did you design it? Could you share the sample file or a screenshot of this page, including which fields are placed in your line chart & which fields are placed in your slicer. 

vxiaotang_0-1659927989712.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.