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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Maria_Buzaglo
Helper I
Helper I

Get Web URL parameter to use it as a measure

Hi,

 

Is it possible to get a parameter from an web URL and have it in a measure? 

 

Example: to have an URL (that ends with '?filter Country/CountryName eq 'Potugal')  and to build a measure that, when presented in a card, will show "Portugal" because it is what is written in the URL filter.

 

Thanks in advance,

 

4 REPLIES 4
negi007
Community Champion
Community Champion

@Maria_Buzaglo If you want to know the username of the person who is accessing the report, you can get the username using username() function in powerbi. Once you have the username, you can use Row Level Security (RLS) to restrict access to the person accessing only his data.

 

Refer to below links to understand RLS

https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls

 

If you are looking for something else, please let us know what exactly you wish to achieve.

 




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



Proud to be a Super User!


Follow me on linkedin

negi007
Community Champion
Community Champion

@Maria_Buzaglo I guess you wish to extract the country name from a web URL and then use the name of the country in other measure. It can be done easily, if you have a columns with web URL values, you can extract the name of the country in the powerquery window. You can add a column from existing column, and then this new column can take or exract the country name. 

Second way is by creating a column in the powerbi desktop there are also it can be done.

 

I suggest you to try above. If you face any problem, please share few columns values in text format, so that exact solution could be provided to you. Thanks




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



Proud to be a Super User!


Follow me on linkedin

amitchandak
Super User
Super User

@Maria_Buzaglo , this the service url or a column.

 

if it a column that has URL, then

a new column like this in dax 

right([column], len([column) - (search("eq ",[Column],,0)+3))

@amitchandak 

Actually it is not a column. My report is in the sharepoint. What I would like is:

a user sings in the sharepoint and, in the URL sharepoint exist a parameter that is the username. I want to grab that parameter and use it in the power bi report to filter the information just for that user. 

This is the general thing I want to do.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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