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
Cleverbro
Regular Visitor

Average between Years

Hi Guys, peace. 

 

I have a situation that I don't know how to solve. 

 

So, I need to calculate the average between the years and bring this information fixed as a example below, in column MD LY I almost reached my target, but it's bringing an average between the 3 years and I need to do each year separated. 

I've tryed a lot of manners to do it, but I couldn't find a solution yet. Please, if anyone have a tip or idea to solve it, would be great. 

 

Cleverbro_1-1663105517633.png

Cleverbro_2-1663105538189.png

Cleverbro_0-1663105485591.png

 

 

Best Regards 

Clever

18 REPLIES 18
v-tangjie-msft
Community Support
Community Support

Hi @Cleverbro, 

According to your description, you want to calculate the average between the years, right? Here are my steps you can follow as a solution. 

 

(1)If you want to calculate the average by year, you can filter directly in the "Columns" section. 

 

vtangjiemsft_0-1663151276851.png

 

 (2)Then the result is as follows. 

vtangjiemsft_1-1663151276852.png

 

If this method does not meet your needs, you can provide us with detailed input and output examples in tabular form so that we can better solve the problem for you. 

 

Best Regards, 

Neeko Tang 

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

 

 

@v-tangjie-msft 
I've tryed but this option don't shows to me. 
@tamerj1 
Tamer, I'm doing a caculation in each line of my database,

so I want to bring a Avg Price Unit per Year Total like the colunm MD below and this be fixed like in the Formula MD in the 1ªScreenShot ,

But when I'm seing per month in the 2ªScreenshot, I've differents prices and they shoud be the same value as the 1ªScreenShot fixed (MD)

 

1ªScreenshot

Cleverbro_0-1663164167564.png

But We can see that each month I've different's Price Unit


2ªScreenShot

Cleverbro_1-1663164246043.png

@amitchandak 

 

The only point is that I'm using formulas to reach in my price unit, like below. 

So when I try to use Sum, it's not allowed. 

 

Cleverbro_4-1663164348932.png

Cleverbro_5-1663164370525.png

Cleverbro_3-1663164326524.png

 

Do we have another Alternative? 

 

Thanks

Clever

 

Hi @Cleverbro 

Seems you have multiple queries. Let start with this

Price Unit EUR =
CALCULATE (
DIVIDE ( [Total Costs EUR], [Volume Total KG] ),
ALLEXCEPT ( 'Date', 'Date'[Year] )
)

Hi @tamerj1  , peace


So I did some tryes here, but nothing worked well. 
So could we make this meet? When are you available? Friday (23/09) looks good to you? 

 

Best Regards. 

Clever

@Cleverbro 

Yes 12:00-13:00 Dubai time

Good Morning @tamerj1 

 

Nice, let's schedule it. 
Could you please inform your e-mail. I'll send you an invitation. 

Best Regards. 

Clever

tamer_juma@yahoo.com

@tamerj1  very nice. 

 

I sent to you an invitation to tomorrow, at the time that you said. 

Please, let me know If is a good time or If we need to re-schedule. 

If you want, you can send me a new proposal. 

Bye

Clever

Yes I saw it. It is ok with me

@tamerj1 

 

First, I'm sorry for didn't get in. 
If possible, could we schedule again? Maybe in another time? 
I'm at Brazil Time. 
Please, return me 

Best Regards, Clever. 

Today 6:00pm Dubai Time?

Brother, 

Feel free to suggest another time so, 

 

When you be avaiable for me it's going to be nice. 
Tomorrow I'm free and on Monday onwards


So, When be a good time for you, I'll separate this time for sure. 

 

Thanks for your disposition. 

 

Clever

So, 

 

I just get in and I'm waiting for you right now. 

 

Can you join with me? 

 

Clever

Hi @tamerj1 

I did it, but I think that didn't work well. 
Look

If you have a time, we could make a quicky meet to see it, then we can apply your knowledge if necessary. 

Cleverbro_0-1663174877771.png

 



@Cleverbro 

We can do that tomorrow morning Dubai time. What is your time zone?

tamerj1
Super User
Super User

Hi @Cleverbro 

what exactly is your expected result?

amitchandak
Super User
Super User

@Cleverbro , You need to try a measure like

 

Rolling 3 = calculate(AverageX(Values('Date'[Year]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,Year))

 

replace sum sales amount with your measures , sum till year level and then avg.

 

Avg above month level

Rolling 3 = calculate(AverageX(Values('Date'[MONTH Year]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,Year))

Hi, good night, peace


I've tryed with Sum, but it's not working. 
But thanks

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.

Top Solution Authors