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

Average of Rates

I built out a table in powerBI to give me average of a series or rates.   However, the average is wrong.  I wrote out the new table like this: 

summarizecolumns(Sheet1[District],'Sheet1'[Fiscal Year],"Usage Rate",Average('Sheet1'[%Beds]))

 

For example, district only has one hospital with a rate of 81.1% for a specific year. However, when I create the table for with "Usage Rate" by district for that specific year, the table reads 83.5.  The table should have a rate fo 81.1 for one hospital in that district for that year . Since that average is wrong, I can safely assume the average is wrong for all other districts with multiple hospitals. 

 

 

4 REPLIES 4
v-rongtiep-msft
Community Support
Community Support

Hi @awashington6 ,

Please try to modify you table.

 

an_other =summarizecolumns('Sheet1'[Fiscal Year],Sheet1[District],"Usage Rate",Average('Sheet1'[%Beds]))

 

If I have misunderstood your meaning, please provide your pbix file without privacy informarion and desird output.

 

Best Regards

Community Support Team _ Polly

 

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

 

 

awashington6
Regular Visitor

I am still very new to this.  I think I may have done this incorrect or described the situation incorrectly. I think I see what the problem is but do not know how to fix.   I created a summarized table for totals by year.  I then create another summarized table, create a matrix on the same page.  It appears that the first matrix is threwing off the second matrix.  In looking at the relationship, there is no relation between the two tables.  However, they both are connected to same lookup table in relationshops.  Any guidance would be helpful.     

ValtteriN
Super User
Super User

Hi,

I think the likely reason behind this is that you have some filter affecting the calculation (in your test) or alternatively "However, when I create the table for with "Usage Rate" by district for that specific year, the table reads 83.5. "

Here you refer to year but in your original DAX you use fiscal year. I recommend double cheking filters + columns used since the DAX seems good on a glance. To elaborate further I would need to see the data. (as littemojopuppy mentioned)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




littlemojopuppy
Community Champion
Community Champion

@awashington6 can you share any data so someone can try to figure this out?

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