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
anandsoftweb
Helper II
Helper II

DAX calculation to find out average of count measure by categorywise

Hello Folks,

 

I need the DAX calculation for average out the count of each status as below in table

E.g :- Bug Count :- 15 and Avg would be 15/ 7(Total bug status record is 7) = 2.14 so I want to display that into the other column on each bug status 

 

Untitled.png

 

Thanks,

Anand

5 REPLIES 5
MFelix
Super User
Super User

Hi @anandsoftweb,

 

Try this measure:

 

Bug status = DIVIDE(SUM(Bugs[Count]),COUNT(Bugs[Date]))

divi.png

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix

 

Thanks for the reply but I want to keep date column should be there and need to find out the average as per the bug status though it should be repeating in column.

 

HI @anandsoftweb,

 

Try this 

Bug Average =
CALCULATE (
    DIVIDE ( SUM ( Bugs[Count] ), COUNT ( Bugs[Date] ) ),
    ALLEXCEPT ( Bugs, Bugs[Bugs] )
)

 

Final resutl below:

average.png

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix 

 

Thanks for the solution but only allexcept(Bug,Bug[status]) wont be working need to consider date as well to figure out the desired solution. 

 

But useful comment 🙂 

 

Thanks,

Anand 

Add the date to.the.allexcept.formula

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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.