Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
powerBIuser_34
New Member

Need help with group by and top row

Hi All,

 

I am new to Power BI and trying to generate a report for users with last login date. I am able to successfully import the data in PowerBI as per below tabular format.

 

UsersLogin Date
user1Aug 14, 2019
user1Aug 13, 2019
user1Aug 12, 2019
user2Aug 12, 2019
user2Aug 11, 2019
user3Aug 16, 2019
user3Aug 14, 2019
user3Aug 13, 2019

 

output required -

 

UsersLast Login Date
user1Aug 14, 2019
user2Aug 12, 2019
user3Aug 16, 2019

 

Thanks in advance for any thoughts/suggestions.

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @powerBIuser_34 ,

 

Create a measure

 

Max Login Date = CALCULATE(MAX('Table'[Login Date]),ALLEXCEPT('Table','Table'[Users]))
 
 
1.jpg
 
Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @powerBIuser_34 ,

You can achieve it by using the system default aggreation function "Latest" or creating a measure as below:

MLogin_Date = CALCULATE(MAX('Users'[Login Date]),FILTER(ALL('Users'),'Users'[Users]=MAX('Users'[Users])))

latest.jpgBest Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
harshnathani
Community Champion
Community Champion

Hi @powerBIuser_34 ,

 

Create a measure

 

Max Login Date = CALCULATE(MAX('Table'[Login Date]),ALLEXCEPT('Table','Table'[Users]))
 
 
1.jpg
 
Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.