Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Edit: Simplified my example and description to make it easier to understand.
I have a data like below. The table contains employees and managers. Managers are also present as employee records.
I want to calculate the no. of emps per manager title. I am trying to populate the below table visual and am having a challenge in getting the highlighted value.
Solved! Go to Solution.
Hi @kk_shp_user
Try using TREATAS
Total_Emps_at_Title =
CALCULATE (
COUNTROWS ( 'Table' ),
TREATAS ( VALUES ( 'Table'[recruiter_title] ), 'Table'[emp_title] )
)
Hi @kk_shp_user
Try using TREATAS
Total_Emps_at_Title =
CALCULATE (
COUNTROWS ( 'Table' ),
TREATAS ( VALUES ( 'Table'[recruiter_title] ), 'Table'[emp_title] )
)
Thanks for yourt reply but the solution did not get the expected result.
Apologies, its sensistive data hence posted an exmaple.
That said, than you so much. I got it to work using TREATAS() like you mentioned. I was using a measure inside the calculate and so had to add the ALLEXCEPT condition to remove ther filters affecting the measure and the TREATAS worked as expected.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 8 | |
| 7 |