Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
I have 2 tables. They have a many to one join on companyname
Table 1 = Data (Companyname, location, State)
Table 2 = Users (lastlogin, totallogins)
How can I return the number Users.TotalLogins?
I want to presume that Table2 might have more than one totallogins for whatever reason and return the bigger number.
Thanks
Solved! Go to Solution.
I think this works but is this the best method?
The formula you've written works in a calculated column to get the max logins. When you use it in a visual it is automatically aggregating that column (in this case an average). You can use the pull down to change the type of aggregation (e.g., sum), but you may want to consider just using a measure instead of a calculated column. In that case, you might just need a measure like
Max Logins = Max(Table2[TotalLogins])
If you use that in a visual with UserID, it will automatically give you the max for that user.
If this works for you, please mark it as the solution. Kudos are great too. Please let me know if it doesn't or if any questions.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Maybe: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/td-p/985814
Maybe: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/td-p/985814
I think this works but is this the best method?
The formula you've written works in a calculated column to get the max logins. When you use it in a visual it is automatically aggregating that column (in this case an average). You can use the pull down to change the type of aggregation (e.g., sum), but you may want to consider just using a measure instead of a calculated column. In that case, you might just need a measure like
Max Logins = Max(Table2[TotalLogins])
If you use that in a visual with UserID, it will automatically give you the max for that user.
If this works for you, please mark it as the solution. Kudos are great too. Please let me know if it doesn't or if any questions.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 18 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 21 | |
| 13 | |
| 12 |