cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 118 members 1,675 guests
Please welcome our newest community members: