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
TonicQuake
Regular Visitor

Level of Detail Expression

Hi All, 

 

I'm trying to get to the total number of distinct advisers in a team when looking, when an indiviudal is selected. 

 

This is what I have tried: 

 

TonicQuake_0-1639574232355.png

 

In the TeamMember Count field, I'm expecting it to display 9 as there are only 9 members in the Life team that have a Total > 0


Thanks


Rob. 

 

 

1 ACCEPTED SOLUTION

I've manged to figure it out, by getting it to calculate the first part then, Calculate the All and AllExcept, Calculation below:

 

TotalAdviser Count =
CALCULATE(
CALCULATE(
DISTINCTCOUNT(Adviser[AdviserName])
,FILTER(Outcome,[Total Leads] > 0)
)
,ALL(Adviser)
,ALLEXCEPT(AdviserFloor,AdviserFloor[AdviserFloorName])
)
 
Thanks All.

 

View solution in original post

3 REPLIES 3
TonicQuake
Regular Visitor

@amitchandak Thank you for your response. 

I have attached  sample pbix file, with very basic made up data, but the same style of how the my acutal tables are linked. 

 

In the example file attached, I would expect the TotalAdviser Count to equal 4 as only 4 out of the 10 advisers have quoted in that Team. 

 

pbix file uploaded to file.io

https://file.io/sWAwmrfxLpsT

 

TonicQuake_0-1639576292573.png

 

Thanks

amitchandak
Super User
Super User

@TonicQuake ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

I've manged to figure it out, by getting it to calculate the first part then, Calculate the All and AllExcept, Calculation below:

 

TotalAdviser Count =
CALCULATE(
CALCULATE(
DISTINCTCOUNT(Adviser[AdviserName])
,FILTER(Outcome,[Total Leads] > 0)
)
,ALL(Adviser)
,ALLEXCEPT(AdviserFloor,AdviserFloor[AdviserFloorName])
)
 
Thanks All.

 

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.