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

DAX measure for Average

Hello, 

I am trying to get a average for 1 row, multiple columns. Here is what I mean:

I have various Court's, and Total Filings for those courts over time, Jan 2020, Feb 2020 etc. I need to write a measure that gets the average total number of filings for each court across the entire time period that I have. Any help with this measure, thanks!

pfarahani_0-1650129725359.png

 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Assuming you have dagged Year and Month to the column well of the matrix visual from the Calendar Table and the numbers are the result of a measure that you have written, say Measure 1, write this measure

Measure 2 = calculate([measure 1],all(calendar[YearMonth]))

I have assumed that YearMonth is a column in your Calendar Table.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
vojtechsima
Memorable Member
Memorable Member

Hi, @pfarahani ,
I suggest doing what @PaulDBrown wrote.
But if you don'T wanna restructure your model, you can use something like his (but it's a bit awkward):

(AVERAGE('Table'[January2021])+average('Table'[February2022])+average('Table'[March2021])))/X //X=count of columns

 

PaulDBrown
Community Champion
Community Champion

If that is how your data is structured, you need to unpivot the Month-Year columns. 
you can the create a measure along the lines of:

Average Filings = CALCULATE (AVERAGE (Table[Filings]), ALLEXCEPT(Table, Table[Court]))





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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.