Forum Discussion

jlie's avatar
jlie
Advocate I
9 years ago
Solved

Calculate One-Time Visitors from Google Analytics Session Data

I have a data table that contains single Sessions and the Dimension ga:userType, that states if the Session is the first session of the identified user or a subsequent one ("New Visitor" vs. "Returni...
  • jlie's avatar
    jlie
    9 years ago

    Ok, i figuered it out:

     

    I need two measures on the table AnonymousSessions

    Returning Visitors = 
    CALCULATE(
        DISTINCTCOUNT(AnonymousSessions[Client Id]);
        AnonymousSessions[User Type]="Returning Visitor"
    )
    
    OneTimeVisitors = 
        DISTINCTCOUNT(AnonymousSessions[Client Id]) - [Returning Visitors]

    This yields the correct data; I can now slice/dice the sessions by channel or date and see 100% accurate the returning and one-time visitors in the respective context.