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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kumsha1
Post Patron
Post Patron

Incorrect column totals average

Hi,

 

In the table visual below, the row wise average seems ok but the column totals average is incorrect. Can someone let me know what might have gone wrong here and help to rewrite the DAX, as of now the average column is directly coming from DB...TIA.

 

kumsha1_0-1636683457663.png

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @kumsha1 

 

Download example PBIX file.

 

Use this measure

AvgX = AVERAGEX('DataTable', DIVIDE(SUM('DataTable'[DailyValue]),SUM('DataTable'[DailyPlanValue]))) * 100

 

avgx1.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

Hi @kumsha1 

 

Download example PBIX file.

 

Use this measure

AvgX = AVERAGEX('DataTable', DIVIDE(SUM('DataTable'[DailyValue]),SUM('DataTable'[DailyPlanValue]))) * 100

 

avgx1.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

Hi @kumsha1 

 

So the last column is showing averages?  How is this calculated?  It seesm to be showing (for the most part) the ratio of Daily Value / DAILY_PLAN_VALUE * 100

 

Please supply your data, it's hard to work things out with just a summary of the data and not knowing how the calculations are being made.

 

But, if the Average column is coming from the database, I can't change those values.  The column will need to be recomputed in DAX.

 

I suspecty the issue is something to do with the average being calcalated using AVERAGE rather than using AVERAGEX over the table.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi @PhilipTreacy 

Average is coming from the DB, i need the average to DailyValue TOTAL/DailyPlanValue TOTAL, not the average of the average column...Below is the data.

 

DailyValueDailyPlanValueValue/Plan 
9201874639.36123.28 
115946105329.98110.08 
147581112604.98131.06 
136989134429.98101.90 
134605145263.3992.66 
80192129910.8361.73 
104279114558.2791.03 
811610816736.7899.37101.68

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.