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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
puru85
Helper II
Helper II

Dynamic URL Filtering for Phone Numbers in Power BI URL

Hi Experts,

I have a Customer Dashboard in Power BI that has been published to the Power BI Service. This dashboard includes customer phone numbers and details about their purchases.

Context:
When I receive a call from a customer via Microsoft Teams, I want to link this information to Microsoft Teams using a URL. For example: http://Customerdashboardurl.com/#[phone number]. When this URL is updated with a different phone number, the destination will show different contents based on the matched phone number.

The following is sample data.

puru85_0-1724417239440.png

Current Approach: For now, the dashboard uses basic filtering with URLs like this:
https://app.powerbi.com/groups/me/reports/26d5425d-da53-4ab1-a7c1-d7509fed0dd9/a772bbf4995425b63827?... eq '6061258722'

puru85_1-1724417375065.png

 


This method effectively filters the dashboard to show data for phone numbers that exactly match ‘6061258722’.

Requirement:
I need to implement advanced filtering where the phone numbers contain ‘9055570868’ rather than an exact match. 

The Reason behind implementing advanced filtering in URL Filter is to identify not just the primary customer but potentially any family or associated members linked via similar phone numbers.

Below is the expected outcome of advanced filtering in URL Filter for Phone number ‘9055570868’.



puru85_2-1724417540079.png

Attached is the PBIX: 

CustomerDashboard.pbix


Could anyone guide me on how to achieve this advanced filtering in Power BI URL ? Any help or suggestions would be greatly appreciated!

Thank you!

 

1 ACCEPTED SOLUTION
v-xianjtan-msft
Community Support
Community Support

Hi @puru85 

 

You can try to create a separate phone table as a slicer, and set a filter in your table visual, associated with the slicer by the “CONTAINSSTRING” DAX function. 

Here are the detailed steps, hope it can meet your requirement.

1. Create a separate phone table and then create a slicer with "PhoneNumberFilter" field. ("phone" type:Text)

 

PhoneFilterTable = SELECTCOLUMNS(
    DISTINCT(Customer_FK[Phone]),
    "PhoneNumberFilter", Customer_FK[Phone]
)

 

2. Create a new measure with the following DAX:

 

FilteredRows = 
IF(
    CONTAINSSTRING(SELECTEDVALUE(FamilyMembersTable[PhoneNumbers]), SELECTEDVALUE(PhoneFilterTable[PhoneNumberFilter])),
    1, 
    0)

 

3. Drag "PhoneNumbers" field into the table visual and then drag “FilteredRows” into the Filter panel of the table visual and set the condition to is 1.

vxianjtanmsft_0-1724651298050.png

4. Publish to Power BI Service and test.

example URL: https://app.powerbi.com/groups/{groups_id}/reports/{report_id}?filter=PhoneFilterTable/PhoneNumberFilter eq '4329159883'

vxianjtanmsft_1-1724651834788.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
puru85
Helper II
Helper II

Hi @v-xianjtan-msft ,

Thank you so much for great help!, Could I request you to share your working Customer dashboard.pbix.


Hi @puru85 

Of course, please refer to the uploaded attachment.

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-xianjtan-msft
Community Support
Community Support

Hi @puru85 

 

You can try to create a separate phone table as a slicer, and set a filter in your table visual, associated with the slicer by the “CONTAINSSTRING” DAX function. 

Here are the detailed steps, hope it can meet your requirement.

1. Create a separate phone table and then create a slicer with "PhoneNumberFilter" field. ("phone" type:Text)

 

PhoneFilterTable = SELECTCOLUMNS(
    DISTINCT(Customer_FK[Phone]),
    "PhoneNumberFilter", Customer_FK[Phone]
)

 

2. Create a new measure with the following DAX:

 

FilteredRows = 
IF(
    CONTAINSSTRING(SELECTEDVALUE(FamilyMembersTable[PhoneNumbers]), SELECTEDVALUE(PhoneFilterTable[PhoneNumberFilter])),
    1, 
    0)

 

3. Drag "PhoneNumbers" field into the table visual and then drag “FilteredRows” into the Filter panel of the table visual and set the condition to is 1.

vxianjtanmsft_0-1724651298050.png

4. Publish to Power BI Service and test.

example URL: https://app.powerbi.com/groups/{groups_id}/reports/{report_id}?filter=PhoneFilterTable/PhoneNumberFilter eq '4329159883'

vxianjtanmsft_1-1724651834788.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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