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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.