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
prajanto
Frequent Visitor

Average and sum

Maybe someone can help me how if I calculate below:

        jan    feb    mar    apr    may   Jun  July  Average
A     100   200    50     300    700    100          241.7
B      50    100    100    200                             112.5
C      10    50      30     100    60      100          58.3
D              10      20     30      20      10            18.0
                                                                Sum 430.5

 

Thank You

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@prajanto 

Column =
VAR n = CALCULATE(COUNTA(Test[Jan])+COUNTA(Test[Feb])+COUNTA(Test[Mar])+COUNTA(Test[Apl])+COUNTA(Test[May])+COUNTA(Test[Jun]),ALLEXCEPT(Test,Test[Category]))
Return DIVIDE(CALCULATE(SUMX(Test,Test[Jan]+Test[Feb]+Test[Mar]+Test[Apl]+Test[May]+Test[Jun]),ALLEXCEPT(Test,Test[Category])),n,0)
Second approach
It will be better if you can pivot the table and then calculate the average

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@prajanto 

Column =
VAR n = CALCULATE(COUNTA(Test[Jan])+COUNTA(Test[Feb])+COUNTA(Test[Mar])+COUNTA(Test[Apl])+COUNTA(Test[May])+COUNTA(Test[Jun]),ALLEXCEPT(Test,Test[Category]))
Return DIVIDE(CALCULATE(SUMX(Test,Test[Jan]+Test[Feb]+Test[Mar]+Test[Apl]+Test[May]+Test[Jun]),ALLEXCEPT(Test,Test[Category])),n,0)
Second approach
It will be better if you can pivot the table and then calculate the average

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