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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Petecart77
Helper I
Helper I

Calculating numbers from text

Hi there,

I have 3 columns of data in a data set which i need to use to calculate the number of direct reports, the number of indirect reports and also what layer number an individual sits in with regards to the org design.

I have attached a copy example of the data set with the format of the columns and also the formula that i currently use to calculate this in excel. I need to convert the excel formulas to DAX formulas so i can replicate this in Power BI.

Hoping you can help me

Number of Direct ReportsCOUNTIF(Workers Manager,"*"&$Preferred Name&"*")
Number of Indirect ReportsCOUNTIF(All Managers in Management Chain,"*"&Preferred Name&"*")-Number of Direct Reports
Layer No.(((LEN(All Managers in Management Chain)-LEN(SUBSTITUTE(All Managers in Management Chain,CHAR(10),""))+1)/2)+0.5)

Thank you

 

Preferred NameWorker's ManagerAll Managers in Management Chain
Tim FellowPaul ScholesRoger Rabbit

Daffy Duck

Mike Myers

Shirley Temple
Mark WrightTim FellowRoger Rabbit

Mike Myers

Jose Hernandez Lugo

Shirley Temple
John BarnesKirsty GallagerRoger Rabbit

Daffy Duck

Mike Myers

Juan Carlos Rangel Lopez

Shirley Temple

 

2 REPLIES 2
Petecart77
Helper I
Helper I

Thanks @Greg_Deckler but i cannot see anything that helps with my specific need and need assistance with this fairly soon. Cheers anyway

Greg_Deckler
Super User
Super User

@Petecart77 You might find this helpful: (2) Excel to DAX Translation - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.