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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Problema with Accumulated Average

Hello everyone,

 

I'm having a problema traying to accumulate the average of a value in a table, what i need is to get the value "Acum" above here

 

pic1.PNG



 

 

 

 

 

What I'm using in BI is this formula,

 

Prod Acum BOE = CALCULATE (SUM( '206 - Shale y Tight'[Producción Mensual (BOE)]) ,FILTER(ALLSELECTED( '206 - Shale y Tight'[Mes de Prod]),ISONORAFTER('206 - Shale y Tight'[Mes de Prod],MAX('206 - Shale y Tight'[Mes de Prod]),DESC)))

But this accumulate me the total value of "Producción Mensual (BOE)" and I need the average of it, i try doing a column of the average of this variable but it doesnt work.

 

¿Can someone help me?

 

 

1 ACCEPTED SOLUTION

@Anonymous 

 

Try this to see if it is what you are after:

 

 

Averages final.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

7 REPLIES 7
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Create a measure using dax below:

Prod Average BOE =
CALCULATE (
    AVERAGE ( Table1[Producción Mensual (BOE)] ),
    FILTER (
        ALLSELECTED ( Table1[Mes Producción] ),
        ISONORAFTER ( Table1[Mes Producción], MAX ( Table1[Mes Producción] ), DESC )
    )
)

Community Support Team _ Jimmy Tao

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

Anonymous
Not applicable

@v-yuta-msft i try that way at the first time but I don't know what problem is with the base that the calculate is wrong:

 

The second row should have a value near 25 Th BOE not 12.338...

 

pic2.PNG

@Anonymous 

 

Try this to see if it is what you are after:

 

 

Averages final.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Great! that's what i was looking for! Thanks @PaulDBrown 

PaulDBrown
Community Champion
Community Champion

Hi @Anonymous ,

 

I'm not actually too sure what you are trying to achieve. If you are trying to work out the running (acum) average based on the absolute monthly averages (for example the output for month 2 would be the (average of month 1 + the average of month 2)/2, the here are a couple of options:

 

 

Ave acum.JPG

 

The option in grey is dividing the "Prod Acum BOE" by the number of months. The option in blue is an AVERAGEX calculation also base on the "Prod Acum BOE" (which actually provides the same result if you use the SUM of "Producción Mensual BOE".

 

Here is the PBI file:

 

Average of averages

 

Hope this helps

Regards.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Hi @PaulDBrown thanks for you answer,

 

What I need is to accumulate the average of production made by each "pozo" in each moth, the correct value i want to represent is the value in yellow show here:

pic1.PNG

 

Anonymous
Not applicable

Here is the data base for anyone who could help me, thanks a lot.

 

https://drive.google.com/drive/folders/1FBt5syNr6H7Q3zIt57zrtjN6XkLir93V?usp=sharing

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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