cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills 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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors