cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
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

Accepted Solutions
Highlighted

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.

View solution in original post

3 REPLIES 3
Highlighted
Super User IV
Super User IV

@VV13 , Not very clear

Try like


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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted

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])

 

Highlighted

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors