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
Anonymous
Not applicable

Text Lookup in a Row

HI My Data is organized into Email and L1-L10 mapping into their manager. 

 

For each row i want to find out the occurance of the Organizations top guy, so that i can find the index for each row and run the processing based on that. Much like MATCH("top.guy@org.com",A3:J3,0)  form EXCEL, 

 

TIA 

1 ACCEPTED SOLUTION

Hi @Anonymous,

According to your snapshot, I think you do not need to use the whole 10 level fields. 

You can use L1 and L2 with path functions to analyze the parent-child hierarchy, then it should simply use the PATHLENGTH, PATHITEM functions to extract the top level from the above structure.

Parent-child hierarchies 

Dax functions:

Function Description
PATH Returns a delimited text string with the identifiers of all the parents of the current identifier.
PATHITEM Returns the item at the specified position from a string resulting from evaluation of a PATH function.
PATHLENGTH Returns the number of parents to the specified item in a given PATH result, including self.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @Anonymous 

Please read https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/1447523/jump-to/first-unread-message

Can you supply some sample data and examples of the result you want.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Sorry, First time user of this form, pardon my ignorance

Here is the sample data. I want to look up the occurance of D in the row and find the index. based on that index value i create other rules to come up with Line of business. 

 

njha_1-1614045058593.png

 

Hi @Anonymous,

According to your snapshot, I think you do not need to use the whole 10 level fields. 

You can use L1 and L2 with path functions to analyze the parent-child hierarchy, then it should simply use the PATHLENGTH, PATHITEM functions to extract the top level from the above structure.

Parent-child hierarchies 

Dax functions:

Function Description
PATH Returns a delimited text string with the identifiers of all the parents of the current identifier.
PATHITEM Returns the item at the specified position from a string resulting from evaluation of a PATH function.
PATHLENGTH Returns the number of parents to the specified item in a given PATH result, including self.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi,

Your data has not been pasted properly.  Share data in a format that can be pasted in an MS Excel file.  Also, please show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.