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
Cromero3000
Helper I
Helper I

**Can't show Average with 2 different categories**

Hello Team,

I have reviewed other posts related to calculate average but I did not find something related to average of an average with 2 different categories. If there is something similar I would appreciate If you could please redirect me to that post.

 

Here is the problem, I want to show the average of averages per Business (rows) & per months (columns) at the same time with a Total of each but the Totals accuracy changes depending on the formula:

 

1. If I add 'Calendar'[YYYYMM], it shows the correct Total per ROW

TOTALS =
AVERAGEX(
      VALUES('Calendar'[YYYYMM]),
      CALCULATE(AVERAGE(Training[Record % Complete])) + 0
)

 

row.PNG

 

2. If I add 'Hierarchy'[Business], it shows the correct Total per COLUMN

TOTALS =
AVERAGEX(
      VALUES('Hierarchy'[Business]),
      CALCULATE(AVERAGE(Training[Record % Complete])) + 0
)

Column.PNG

 

3. Record % Complete = IF(ISBLANK(Audit[Complete Date]), 0, 1)

 

How can I modify the main formula in order to get the correct Totals per Row & Column? sorry If I can't share a PBIX file but it is linked to classified information. 

 

Thanks in advance for your help!

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @Cromero3000 ,

 

It's because your formula is calculated based on parameters, better to show some sample data let us know what's your table structure looks like.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Hello @v-jayw-msft ,

Thank you, I apologize for not sharing sample data but it is complicated due to it has many calculations in the background such as dates & averages with sensitive information. 

 

Based on what you have seen, how should I replace the parameters to make it work? I'm not sure If this helps but, the "Calendar" & "Hierarchy" are fact tables with no relation between them. 

 

Thank you

amitchandak
Super User
Super User

What is the formula of (Training[Record % Complete]). If it sum(A)/Sum(B), you should not need Average.

If it A/B the change it to sum(A)/Sum(B)

@amitchandak Hello, it is bullet #3:

 

  • Record % Complete = IF(ISBLANK(Audit[Complete Date]), 0, 1)

If you mean "(Training[Record % Complete]).", the table name is "Training" and the Column name is "Record % Complete" where it's value is what's shown above

 

Regards

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.