cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
HippySippy Frequent Visitor
Frequent Visitor

Max by group by not working

Hi All,

Please can I know why my max by group by is not working?

I reffered to various threads in here and they have done the same , but doesn't work for me.

I need to find the maximum of 'Changed date' by employee, but it returns the maxium for the table.

PowerBI.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
HippySippy Frequent Visitor
Frequent Visitor

Re: Max by group by not working

I just opened a new power BI and connected, my intial formula works!

max date = CALCULATE(MAX(Sheet1[changed date]),ALLEXCEPT(Sheet1,Sheet1[employee]))
 

Thanks amit for your time and suggestions.

 

PowerBI.jpg

View solution in original post

7 REPLIES 7
amitchandak Super Contributor
Super Contributor

Re: Max by group by not working

You are using on the same table that is causing an issue. Ref -https://docs.microsoft.com/en-us/dax/allexcept-function-dax

Try using employee from the employee dim

HippySippy Frequent Visitor
Frequent Visitor

Re: Max by group by not working

Hi Amit,

Thanks, but I don't have a dimesion table. 

Is it possible to find the maximum within the same table?

amitchandak Super Contributor
Super Contributor

Re: Max by group by not working

HippySippy Frequent Visitor
Frequent Visitor

Re: Max by group by not working

Hi,

I am a newbie to power BI and DAX,  couldn't understand where the test107measure column/measure came from in the formula  ?

https://community.powerbi.com/t5/Desktop/Calculate-subtotal-using-dax/td-p/564402

 

 

Test107 = CALCULATE(SUM(Test107Measure[Sales]),FILTER(ALL(Test107Measure),Test107Measure[Client]=SELECTEDVALUE(Test107Measure[Client]))) 

 

HippySippy Frequent Visitor
Frequent Visitor

Re: Max by group by not working

I also noted that this case is simillar to me but works 😞

https://community.powerbi.com/t5/Desktop/Filter-only-highest-value-by-category/m-p/118551#M50044

 

Any hhelp will be greatly appreciated.

amitchandak Super Contributor
Super Contributor

Re: Max by group by not working

Should be something like this in your case

 

Max Employee = CALCULATE(max(sheet1[change Date]),FILTER(ALL(sheet1),sheet1[employee]=SELECTEDVALUE(sheet1[employee]))) 

 

 

So it might work as a measure

HippySippy Frequent Visitor
Frequent Visitor

Re: Max by group by not working

I just opened a new power BI and connected, my intial formula works!

max date = CALCULATE(MAX(Sheet1[changed date]),ALLEXCEPT(Sheet1,Sheet1[employee]))
 

Thanks amit for your time and suggestions.

 

PowerBI.jpg

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 508 members 4,442 guests
Please welcome our newest community members: