cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bs1cad Frequent Visitor
Frequent Visitor

combining multiple values for unique users

Hi All,

 

I have 2 columns, userID and platform. The platform indicates whether the logged in via the web or native app. I would like to look at how many userIDs are associated with web only, native only and web&native. Any ideas on how I might do this?

 

Thanks,

Chris

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: combining multiple values for unique users

@bs1cad

 

Try this pattern

 

Native Only =
COUNTROWS (
    FILTER (
        VALUES ( Table1[UserID] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "native" )
            > 0
            && CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] <> "native" )
                = 0
    )
)

 

WEbOnly =
COUNTROWS (
    FILTER (
        VALUES ( Table1[UserID] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "Web" )
            > 0
            && CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] <> "Web" )
                = 0
    )
)

 

Both =
COUNTROWS (
    FILTER (
        VALUES ( Table1[UserID] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "Web" )
            > 0
            && CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "native" )
                > 0
    )
)

 

1 REPLY 1
Super User
Super User

Re: combining multiple values for unique users

@bs1cad

 

Try this pattern

 

Native Only =
COUNTROWS (
    FILTER (
        VALUES ( Table1[UserID] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "native" )
            > 0
            && CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] <> "native" )
                = 0
    )
)

 

WEbOnly =
COUNTROWS (
    FILTER (
        VALUES ( Table1[UserID] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "Web" )
            > 0
            && CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] <> "Web" )
                = 0
    )
)

 

Both =
COUNTROWS (
    FILTER (
        VALUES ( Table1[UserID] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "Web" )
            > 0
            && CALCULATE ( DISTINCTCOUNT ( Table1[platform] ), Table1[platform] = "native" )
                > 0
    )
)

 

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 312 members 3,056 guests
Please welcome our newest community members: