Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone!
I'm working with sports data, calculating the time on court for players and would like to calculate time when a specific string (player name) is inside a column. Due to the data structure, I have the info for the full FiveOnCourt and based on positions but not for a player alone.
Here is the example:
As you can see, I have "Player7" who played in different positions so I would like to have one only table with the following values for each player (not needed the order because it's only an example with players with more than one position):
PLAYER7 - 1 - 00:17:39 (0:05:26 + 0:12:13) - 41
PLAYER13 - 1 - 0:28:40 (0:21:02 + 0:07:38) - 84
PLAYER...
PLAYER...
So, I guess I have to create a measure to find every string inside the FiveOnCourt but I don't know how I could do it. Could you help me, please?
I add the link to the raw data and the pbix file: https://drive.google.com/drive/folders/1BxVWCtoHkcQYnDfOpqmYFpFgXpoEIPOt?usp=drive_link
Thank you for your time!
Firstly, I'd like to thank you your time. I just have to tell that need to do it in Power BI instead of Excel, so some of the formulas could not work.
Thank you anyway for your time. 🙂
Hi there! It looks like you’re trying to find a specific string (player name) within a column in Excel and use that information to calculate the time on court for each player.
There are several ways you can do this in Excel, including using functions such as SEARCH, FIND, MATCH, and COUNTIF1234.
For example, you can use the SEARCH function to find the position of a specific substring within a text string. The SEARCH function is not case-sensitive and supports wildcards, which can be useful when searching for substrings. You can also use the ISNUMBER function in combination with the SEARCH function to return a TRUE or FALSE result indicating whether the substring was found1.
Another option is to use the MATCH function to find the position of a specific value within a range or array. This function can be useful when you want to find the row number of a specific value within a column3.
I hope this information helps! If you need more detailed instructions or examples, I recommend checking out some of the resources I mentioned above. Let me know if you have any further questions 😊.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |