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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
patricia_csf
Regular Visitor

Select a group of users among a bigger data

Hi, 

I have a table, with 100 users that travelled 1,000 trips (10 trips on average per person).

Among them, 10 went to New York, e.g. 30 trips (3 on average per person).

I can select both data in the table. So far, so good.

 

What I need help is to select, among ONLY these 10 users that travelled to New York (30 trips), how many trips they also had to other places and which places were that. 

E.g.

User 1 went 10 times to NY, and also 3 times to California

User 2 went 1 time to NY, and also 30 times to China

User 3 went 5 times to NY, and also 1x to California and 1x to China

User 4 went 2 times to NY, and 20 times to Brazil...

 

Thx in advance.

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @patricia_csf

 

I used the following sample data to realize it, please refer to the steps below and let me know if it helps.

112708.jpg

 

First create a new table with the following DAX codes to filter the trips of those users who travelled to NY.

NY_User_Trips =
FILTER (
    Trips,
    Trips[User]
        IN (
            SUMMARIZE ( FILTER ( Trips, Trips[Destination] = "New York" ), Trips[User] )
        )
)

 112706.jpg

 

Then use a Matrix visual, put User as Rows, Destination as Columns, Count of Destination as Values (click the drop-down arrow to change Destination's aggregate type into Count) from the new table.

112707.jpg

 

If you don't want to show NY trips, you can apply a Destination filter on the visual with NY unselected. Otherwise, you can also modify the new table DAX codes into:

NY_User_Trips =
FILTER (
    Trips,
    Trips[User]
        IN (
            SUMMARIZE ( FILTER ( Trips, Trips[Destination] = "New York" ), Trips[User] )
        )
            && Trips[Destination] <> "New York"
)

 

 

Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @patricia_csf

 

I used the following sample data to realize it, please refer to the steps below and let me know if it helps.

112708.jpg

 

First create a new table with the following DAX codes to filter the trips of those users who travelled to NY.

NY_User_Trips =
FILTER (
    Trips,
    Trips[User]
        IN (
            SUMMARIZE ( FILTER ( Trips, Trips[Destination] = "New York" ), Trips[User] )
        )
)

 112706.jpg

 

Then use a Matrix visual, put User as Rows, Destination as Columns, Count of Destination as Values (click the drop-down arrow to change Destination's aggregate type into Count) from the new table.

112707.jpg

 

If you don't want to show NY trips, you can apply a Destination filter on the visual with NY unselected. Otherwise, you can also modify the new table DAX codes into:

NY_User_Trips =
FILTER (
    Trips,
    Trips[User]
        IN (
            SUMMARIZE ( FILTER ( Trips, Trips[Destination] = "New York" ), Trips[User] )
        )
            && Trips[Destination] <> "New York"
)

 

 

Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@patricia_csf , Try a measure like

new measure =
var _usr = summarize(filter(Table, Table[City] = "New York" ), Table[User])
return
calculate(count(*) , filter(Table, Table[City] <> "New York" && Table[User] in _usr ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.