function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sid LightningSid Lightning 

Count number of user logins for a Salesforce license in last 7 days and last 30 days

Hi,

i have to Count number of user logins for a Salesforce license in last 7 days and last 30 days in 2 seperate fields  and use it in a salesforce report.

Please note that, I don't need a reporting filter , i want a code, which counts the number of users who have logged in last 7/30 days and store it in 2 seperate fields

AbhishekAbhishek (Salesforce Developers) 
Create a User Login report to show total unique Users logged in per day

https://help.salesforce.com/articleView?id=000328233&type=1&mode=1


An Idea is also raised for your query,

https://trailblazer.salesforce.com/ideaView?id=08730000000JmLx

VOTE IT  so that it can be released in future releases.

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.