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
Lisa-Eagle
Helper I
Helper I

DAX Measure - Unique Count of Users with 1 or less login

Hi there,

 

I am looking for a DAX measure that can help me calculate the total number of users that have only logged in once to our platform.

I have a data field called Login and then an email column.

 

I've started with this measure which gives me the data I am looking to isolate.

LisaEagle_0-1675950704660.png

I can then filter to login count is less than 1 but I would like to place a summary metric on a card and not show any of the user details.

 

Any suggestions please?

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Users logged in once =
VAR SummaryTable =
    ADDCOLUMNS (
        DISTINCT ( 'Table'[Email] ),
        "@num logins", CALCULATE ( COUNTROWS ( 'Table' ) )
    )
VAR NumLoggedInOnce =
    COUNTROWS ( FILTER ( SummaryTable, [@num logins] <= 1 ) )
RETURN
    NumLoggedInOnce

View solution in original post

2 REPLIES 2
Lisa-Eagle
Helper I
Helper I

Thanks @johnt75 that worked a treat! Appreciate the help!

 

johnt75
Super User
Super User

Try

Users logged in once =
VAR SummaryTable =
    ADDCOLUMNS (
        DISTINCT ( 'Table'[Email] ),
        "@num logins", CALCULATE ( COUNTROWS ( 'Table' ) )
    )
VAR NumLoggedInOnce =
    COUNTROWS ( FILTER ( SummaryTable, [@num logins] <= 1 ) )
RETURN
    NumLoggedInOnce

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors