Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
KP_PB
New Member

distinct users for distinct applications

table is like given below

APP NAME  USER ID
APP_A        P1001
APP_A        P1002
APP_A        P1003
APP_A        P1004
APP_B        P1001
APP_B        P1002
APP_B        P1003
APP_C        P1001
APP_C        P1002
APP_C        P1004
APP_D        P1001
APP_D        P1002
APP_D        P1004
APP_D        P1005

 

need result like, common users from all applications

Sample result

APP NAME   USER ID
APP_A         P1001
APP_A         P1002
APP_B         P1001
APP_B         P1002
APP_C         P1001
APP_C         P1002
APP_D         P1001
APP_D         P1002

1 ACCEPTED SOLUTION
KP_PB
New Member

Yes, this worked. Thanks a ton!!

View solution in original post

3 REPLIES 3
KP_PB
New Member

Yes, this worked. Thanks a ton!!

Samarth_18
Community Champion
Community Champion

Hi @KP_PB ,

 

You could create a column as below and use it as filter on visual:-

Common_user =
VAR _dist_app =
    DISTINCTCOUNT ( 'Table'[APP N] )
VAR _com_user =
    COUNTROWS ( FILTER ( 'Table', 'Table'[USER ] = EARLIER ( 'Table'[USER ] ) ) )
RETURN
    IF ( _com_user = _dist_app, "Y", "N" )

Output:-

image.png

File for reference:-

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hi Samarth,

 

Please, Can you explain how this statement evaluates. Thanks.

 

FILTER ( 'Table', 'Table'[USER ] = EARLIER ( 'Table'[USER ] )

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.