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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ZZZZZZZ37
Frequent Visitor

Hi. I'm trying to get the average sales from 2015-2021 but it adds data from 2022.

Hi. I'm trying to get the average sales from 2015-2021 but it adds data from 2022. How can I unfilter 2022 from the year so I will get the correct average sales?

ZZZZZZZ37_0-1662619997694.png

For example on the 3rd row, average sales should be 27,785.86.

 

Thanks.

 

1 ACCEPTED SOLUTION
PowerUserR
Solution Supplier
Solution Supplier

Okay, and is your data column marked as type "date"? 
If that is not the issue, could you please share some sample data and I'll try to help you.

View solution in original post

4 REPLIES 4
PowerUserR
Solution Supplier
Solution Supplier

Okay, and is your data column marked as type "date"? 
If that is not the issue, could you please share some sample data and I'll try to help you.

Hi again. 

 

I fixed my data type and it is now working fine.

ZZZZZZZ37_0-1662625385311.pngZZZZZZZ37_1-1662625407521.png

ZZZZZZZ37_2-1662625412507.png

 

Thank you for your help.

 

PowerUserR
Solution Supplier
Solution Supplier

Hi,

Average Sales (2015-2021)  = Calculate(AVERAGE('Table'[Sales]),Filter('Table','Table'[Date] < DATE(2022,01,01))

this should solve the issue.

Hi, 

 

Thanks for your feedback. I tried to run this but I'm not getting any value. Sorry I'm new with power bi. Please see below.

 

ZZZZZZZ37_0-1662623180972.pngZZZZZZZ37_1-1662623204840.png

 

Thanks.

 

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors