cancel
Showing results for
Did you mean:
Helper I

## Power BI DAX - Average Per Category Calculation

I have a requirment to average by 2 Categories i.e. By Date (Year/Quarter/Month) and by Market. How could I get in DAX average by tow categories?.

Using Quick Measure I get this , how to add another category  - By Date (Year/Quarter/Month)?

AVERAGEX(
KEEPFILTERS(VALUES('Office'[Market])),
CALCULATE(SUM([Column1]))
)

1 ACCEPTED SOLUTION
Community Support

Hi @VV13 ,

You could try ALLEXCEPT() function.

``Measure = CALCULATE(AVERAGE('Table'[value]),ALLEXCEPT('Table','Table'[date],'Table'[categories])``

Best Regards,

jay

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

@VV13 , Not very clear

Try like

AVERAGEX(Summarize('Office','Office'[Market],'Office'[Market], "_1",CALCULATE(SUM([Column1]))), [_1])

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!
Helper I

Thanks for the reply, but in the DAX I need to summarize by 2 categories ,

1. By Date
2. By Market

I used below Dax. but in my visualtion I add this new measure along with the Date or  Office get Error

AVERAGEX(SUMMARIZECOLUMNS(Date[Calendar Month],Offices[Name],"Name1", SUM(Column1[]), [Name2])

Community Support

Hi @VV13 ,

You could try ALLEXCEPT() function.

``Measure = CALCULATE(AVERAGE('Table'[value]),ALLEXCEPT('Table','Table'[date],'Table'[categories])``

Best Regards,

jay

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

Announcements

#### The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

#### Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

#### Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!