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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors