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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Frequency between dates

Hi,

 

I am a basic BI user and need help with a measure.

 

I would also like an explanation of what you are doing so I can learn 🙂

 

I have a table of AAD logins.

 

Each login has a userID, loginCountry, loginDate.

 

I am looking to produce a table that shows for each loginCountry, how many high-frequency-logins (5 logins within 2 days) occured and when the first and last of thise were.

 

I appreciate you teachers.

3 REPLIES 3
Jihwan_Kim
Super User
Super User

HI,

I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

I assume the requirement is to find how many users are the high-frequency-login (more than five per each country) between two dates.

Please check the below picture and the attached pbix file.

 

Untitled.png

 

Login count measure: = 
COUNTROWS( Data )

 

High frequency login users: = 
SUMX (
    VALUES ( Country[Login Country] ),
    CALCULATE (
        COUNTROWS (
            FILTER (
                ADDCOLUMNS ( VALUES ( UserID[User ID] ), "@logincount", [Login count measure:] ),
                [@logincount] > 5
            )
        )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi Kim,

 

Many thanks for your time here.

 

This certainly seems like a good start. However, for this report the definiton of 'high frequency' is a user that has logged in 5 times or more at a specific location within a period of ANY 2 days.

 

I don't know when those 2 days might be, so using a slicer will not work. The measure I am trying to write must return 'users where 5 or more logins were made at an individual country within a 2 day period'.

I would like to see which country, user, date period.

 

So;

if user A logged in once a day for a week in London - i don't care.

If user A logged in 3 times on Jan 1st in Hawai and then 3 times on the 2nd in Paris - i don't care.

if user A logged in twice on Feb 1st in New York and 3 times on the 2nd in New York - i need to see that

if user A logged in twice on Mar 1st in Mexico and 3 times on the 2nd in Mexico - i need to that aswell

 

Many thanks again.

 

Terry

Hi,

Thank you for your message.
Sorry that I do not know how to create a sample that suits your situation, and please share your sample pbix file's link here. And then I can try to look into to it to come up with a more accurate solution.

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.