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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bigfun
Helper I
Helper I

Grouping User Logins by Day

Alright so I am relatively new to BI, and I wanted to see how this would be best done. I have a couple items that I am trying to display for two different levels of data:

 

1. Date of the last time a client logged in. (Working)

This I believe is done by taking the loginDate column and switching it to the 'Latest'

bigfun_0-1659376586252.png

 

2. The total number of logins for each client. (UPDATED - Working)

Ok have one new measure for the 'RPT' Table (to sum up logins by day per id):

Total_Logins = sumx(values(RPT_UserAccountClientLogin[Login Date]),calculate(distinctCOUNT(RPT_UserAccountClientLogin[PlatformUserId])))

 

Second Measure for the 'ui' table (to sum up logins by per unqsession, since this data is page level):

Total_Logins_UI = sumx(values(ui_PageActionView[LoginDate]),calculate(distinctCOUNT(ui_PageActionView[UnqSession])))

 

3. The total number of logins for each client in the past 7 days. (Got it working 🙂 )

For the RPT table I created a measure 

# of Logins Last 7 Days =
VAR Last_Date = TODAY()

RETURN
Calculate ([Total_Logins],
    FILTER (ALL(RPT_UserAccountClientLogin[Login Date]),
    RPT_UserAccountClientLogin[Login Date] > Last_Date - 7 &&
    RPT_UserAccountClientLogin[Login Date] < Last_Date ))
 
But I know it needs to be modified to include 'platformID'
 
 
And for the UI table, I believe the the measure needs to be about the same but include the UnqSession, so I can group them by that metric.

 

I have attached the pbix file

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @bigfun 

Thanks for reaching out to us.

>> Grouping User Logins by Day

what's the expected output? (I opened your pbix file)

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

HotChilli
Super User
Super User

I think the attached sample file is 126 MB which is going to be too big for most people to research the problem.

If you create a smaller sample file which illustrates the problem, you'll get help.

---

Can you clarify what's working and what's not working in the 3 items you have listed above?

Appreciate the feedback, I will tone down the files in the future.. Thankfully I was able to figure out what I needed to build.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.