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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
pakovic
Helper I
Helper I

Calculating the average in the graphs

In this example the accumulated per month is calculated and the line values are the average per month of Euros/Litres, but this average is different in one graph and in the other. For example in November the average is 23.52 but in the left graph it appears 22.70. Why does the left graph calculate the average wrong? How can I make the left graph so that the correct average appears, which is 23.52?

 

attached dropbox pbix


https://www.dropbox.com/s/b3rr05wpgr2ldy6/ejemplo.pbix?dl=0

 

pakovic_0-1641901878156.png

 

1 ACCEPTED SOLUTION

@pakovic , A per me

22.70 coming from divide(sum(Table[Euros]), sum(Table[Litres]))

 

the other one is

averageX(Values(table[Product]), calculate(divide(sum(Table[Euros]), sum(Table[Litres]))  ))

// Avg of rows

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

3 REPLIES 3
pakovic
Helper I
Helper I

But, is correct 22,70 or 23,52 ? I think the correct is 23,52 

 

pakovic_0-1641905446375.png

 

@pakovic , A per me

22.70 coming from divide(sum(Table[Euros]), sum(Table[Litres]))

 

the other one is

averageX(Values(table[Product]), calculate(divide(sum(Table[Euros]), sum(Table[Litres]))  ))

// Avg of rows

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
amitchandak
Super User
Super User

@pakovic , That is a simple average,

In the latest version, You have fx option under the Constant line( Y axis constant line) , Use that and give this measure, you should get correct value

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.