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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

DAX Pattern Lookup

I am hoping someone may give me points, possibly a solution, to something I want to do. We bulit table to log data from client calls. We store the browser user agent as given. If we pull in data from browscap.org for browser information I want to be able to lookup the matching browser in the browscap CSV file I pulled in and add it as a column to my data. This will provide me a want to create a relationship to the table and then allow users to know the different capabilities of the browser for their reporting needs. Like a breakdown of mobile vs desktop usage. 

 

So if my data has: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E) I can find the pattern match to find it in the data from http://browscap.org/ua-lookup that the result will be 

mozilla/4.0 (compatible; msie 7.0; *windows nt 6.1*wow64*trident/7.0*

 

I want to know how I can use the pattern in their CSV to give me back the right row so my solution will work as desired.

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Is there any rules you can use to split your data column to two columns, one contains the key information, like  

mozilla/4.0 (compatible; msie 7.0; *windows nt 6.1*wow64*trident/7.0*

 in this example. And another column contains the rest text?

 

If there is, then you should be able to add an index column in csv table, and use LOOKUPVALUE Function (DAX) to get the related index in your data table. Smiley Happy

 

Regards

Anonymous
Not applicable

Perhaps I need to look into the M language and do a lookup during the loading of the data?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.