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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
DanNewton
Regular Visitor

Distinct count of users who clicked x and y (example data included!)

Hi all, I have a requirement to create a count of distinct users who clicked both x and y using website analytic data. After some researching I am struggling to understand how to do this and would welcome any suggestions/help.

 

I have included a screenshot of sample data as the forum software kept removing the HTML table:

sample.PNG

From the table above the resulting measure shoud show a count of 2, i.e. 2 distinct users clicked BOTH X and Y.

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@DanNewton 

Pls try this

MEASURE = 
var tbl=SUMMARIZE(FILTER('Table','Table'[Clicked]="X" || 'Table'[Clicked]="Y"),'Table'[USER_ID],"COUNT",DISTINCTCOUNT('Table'[Clicked]))
RETURN COUNTROWS(FILTER(tbl,[COUNT]=2))




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@DanNewton 

Pls try this

MEASURE = 
var tbl=SUMMARIZE(FILTER('Table','Table'[Clicked]="X" || 'Table'[Clicked]="Y"),'Table'[USER_ID],"COUNT",DISTINCTCOUNT('Table'[Clicked]))
RETURN COUNTROWS(FILTER(tbl,[COUNT]=2))




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@DanNewton , Try a measure like this with user ID

 

countx(filter(summarize(Table, Table[User], "_1", calculate(distinctcount(Table[Clicked]), filter(Table, Table[Clicked] in {"X", "Y"}))),[_1] =2),[User])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors