Forum Discussion
redwings00
5 years agoHelper I
Direct - Indirect Report Help
Hello, I am looking for some assistance with showing Direct and Indirect reports. This previous thread below provided a great start for myself but I am now trying to expand on this. https://com...
- 5 years ago
redwings00 Easiest thing would be:
Measure = IF(ISBLANK([Measure - Direct Reports]),BLANK(),LEN([Measure - Direct Reports]) - LEN(SUBSTITUTE([Measure - Direct Reports],",","")) + 1)
Greg_Deckler
5 years agoCommunity Champion
redwings00 Easiest thing would be:
Measure = IF(ISBLANK([Measure - Direct Reports]),BLANK(),LEN([Measure - Direct Reports]) - LEN(SUBSTITUTE([Measure - Direct Reports],",","")) + 1)redwings00
5 years agoHelper I
Greg_Deckler - Thank you so much. This works great to get the total counts. Would you know if it would be possible to show the names instead of the ID's?
- Greg_Deckler5 years agoCommunity Champion
redwings00 Like:
Measure - Direct Reports 1 = VAR __empid = MAX('Sheet1'[EMP ID]) VAR direct = FILTER(ALL('Sheet1'),[MANAGER ID] = __empid) RETURN IF ( ISEMPTY ( direct ) = FALSE (), CONCATENATEX ( direct, [EMPLOYEE NAME], ", " ) )I tell people not to use VALUES and CALCULATE but does anyone listen? 🙂
- redwings004 years agoHelper I
Greg_Deckler Thank you again Greg. Would you be able to help with the measure for the indirect names if possible?
I was not aware of the information regarding not to use VALUES and CALCULATE, but will definitely need to read it as I get more comfortable in power BI
- Greg_Deckler4 years agoCommunity Champion
redwings00 Well, that's just my opinion on VALUES and CALCULATE. Indirect is a very simple change:
Measure - Indirect Reports 1 = VAR __empid = MAX('Sheet1'[EMP ID]) VAR direct = SELECTCOLUMNS(FILTER(ALL('Sheet1'),[MANAGER ID] = __empid),"__EMP_ID",[EMP ID]) VAR indirect = FILTER(ALL('Sheet1'),[MANAGER ID] IN direct) RETURN IF ( ISEMPTY ( indirect ) = FALSE (), CONCATENATEX ( indirect, [EMPLOYEE NAME], ", " ) )