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

Measure to create average of one column based on latest month from another column

Hi,

 

i need to create a measure which will calculate average of column- "visits" from table 'A' only for the latest month from column - "fiscal month" which is also part of table "A" using averagefx or any other function

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Jane689 

you may try

Measure =
VAR MaxMonth = MAX ( tableA[fiscal month] )

RETURN

AVERAGEX ( 

FILTER ( tableA, tableA[fiscal month] =MaxMonth ),

tableA[visits]
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Jane689 

you may try

Measure =
VAR MaxMonth = MAX ( tableA[fiscal month] )

RETURN

AVERAGEX ( 

FILTER ( tableA, tableA[fiscal month] =MaxMonth ),

tableA[visits]
)

Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Jane689 

 

Can you please provide sample data as well as expected outcome as an example?

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me 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.

Top Solution Authors