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.
Hi,
I have Emp_ID, Dept, bonus and salary. I calculated bonus % in a measure and then another measure to with condition Bonus<= 5% then "Yes" else "No".
Now I have Emp_ID, Dept, bonus % and yes/No in my view, I want to know how many employees we have yes in each dept or dept wise employees count who are yes in yes/no measure.
Thanks/ Rakesh
Solved! Go to Solution.
You can have this in a new table:
YesNoCount =
SUMMARIZE (
'Table',
'Table'[Dept],
"YesEmployees", COUNTROWS ( FILTER ( 'Table', 'Table'[Yes/No] = "Yes" ) )
+ 0,
"NoEmployees", COUNTROWS ( FILTER ( 'Table', 'Table'[Yes/No] = "No" ) )
+ 0
)
Hi All,
Thanks for the reply but Its not working seems I am missing unbale to attach file thus attaching screen shots for your refernce please help me in this.
Please follow the steps same as I did in the screen shot as this is an example I need to use same logic in different data which I can not share.
Here is data
Data Table-
| Emp_ID | Bouns | Salary |
| 116 | 4618 | 11278 |
| 200 | 2448 | 19153 |
| 134 | 4818 | 16273 |
| 163 | 3495 | 14826 |
| 154 | 3965 | 18387 |
| 164 | 2650 | 17712 |
| 174 | 3724 | 19251 |
| 182 | 4379 | 15607 |
| 186 | 4538 | 15343 |
| 105 | 3736 | 14624 |
| 161 | 3558 | 16835 |
| 135 | 2878 | 14697 |
| 117 | 3810 | 15467 |
| 153 | 4401 | 17927 |
| 176 | 4555 | 12569 |
| 195 | 4519 | 19758 |
| 132 | 3708 | 14623 |
| 171 | 3459 | 18851 |
| 142 | 4991 | 16185 |
| 141 | 2810 | 18898 |
| 119 | 2352 | 14650 |
| 156 | 3007 | 10721 |
| 189 | 3642 | 15484 |
| 107 | 4727 | 12603 |
| 181 | 3640 | 11188 |
| 148 | 4319 | 18131 |
| 188 | 4387 | 17761 |
| 167 | 4122 | 17401 |
| 126 | 2384 | 14965 |
| 185 | 4055 | 18012 |
| 138 | 4703 | 13539 |
| 127 | 3803 | 14571 |
| 183 | 2344 | 13603 |
| 177 | 4482 | 16344 |
| 175 | 2257 | 14888 |
| 166 | 4837 | 19333 |
| 128 | 2787 | 11982 |
| 160 | 2145 | 17417 |
| 190 | 2420 | 18058 |
| 104 | 4924 | 14234 |
| 103 | 4488 | 11297 |
| 150 | 4352 | 16200 |
| 178 | 4374 | 12194 |
| 109 | 2147 | 10538 |
| 121 | 3791 | 16227 |
| 101 | 2669 | 14575 |
| 133 | 4961 | 16651 |
| 140 | 3686 | 11727 |
| 180 | 3089 | 16238 |
| 114 | 3621 | 11718 |
| 106 | 3110 | 11574 |
| 194 | 3536 | 12926 |
| 139 | 4075 | 17357 |
| 100 | 2532 | 11119 |
Ref Table-
| Emp_ID | Dep |
| 116 | Finance |
| 200 | Marketing |
| 134 | HR |
| 163 | IT |
| 154 | Operation |
| 164 | BI |
| 174 | DS |
| 182 | HR |
| 186 | IT |
| 105 | Operation |
| 161 | Finance |
| 135 | Finance |
| 117 | Marketing |
| 153 | DS |
| 176 | HR |
| 195 | DS |
| 132 | HR |
| 171 | Finance |
| 142 | Operation |
| 141 | BI |
| 119 | DS |
| 156 | Operation |
| 189 | Marketing |
| 107 | Finance |
| 181 | DS |
| 148 | HR |
| 188 | DS |
| 167 | IT |
| 126 | Finance |
| 185 | Marketing |
| 138 | DS |
| 127 | IT |
| 183 | Operation |
| 177 | Marketing |
| 175 | IT |
| 166 | Finance |
| 128 | Marketing |
| 160 | BI |
| 190 | IT |
| 104 | Operation |
| 103 | Finance |
| 150 | Marketing |
| 178 | Finance |
| 109 | Operation |
| 121 | Marketing |
| 101 | IT |
| 133 | Marketing |
| 140 | Finance |
| 180 | Finance |
| 114 | BI |
| 106 | DS |
| 194 | Operation |
| 139 | DS |
| 100 | HR |
something.
I have a pbix file with what you might be needing, let me know if this works:
Hi Nikhil,
Thanks for shring file but issue is reamin same.... You calculate Bonuspct and Yes/NO calculation in column but we need to do these calculation in measure because so that I can use these calculation in other way as well not only employee wise.
We need to do that in meausre and then we need to count Yes/No measure on the basis of dep.
Nikil, you are refring Yes/No and bonuspct in nocount and yescount measure but in my case yes/no and bonuspct also calculted in measure that is the issue.
hi, @Anonymous
After my research, you may try to this way as below:
Step1:
Add two count measure
Yes = var _table=ADDCOLUMNS(Ref,"Yes/No",[Yes/No]) return CALCULATE(COUNTROWS(FILTER(_table,[Yes/No]="Yes"))) No = var _table=ADDCOLUMNS(Ref,"Yes/No",[Yes/No]) return CALCULATE(COUNTROWS(FILTER(_table,[Yes/No]="No")))
Step2:
Drag dep field and these two measure into table visual
here is pbix, please try it.
https://www.dropbox.com/s/emxxhz3n2mpck3f/how%20to%20count%20measure%20value.pbix?dl=0
Best regards
Lin
Hi Lin, Awesome this work fine thanks !!
Hi Rakesh,
Are you looking for something like this?
Count =
CALCULATE (
COUNTROWS ( ExampleTable );
FILTER ( 'ExampleTable'; [Bonus] = "Yes" )
)
@Anonymous Could you please show some sample data, the Bonus % you are calculating - Is it the bonus % of the employee out of their salary ?
Sample data and expected output will be really helpful
Proud to be a PBI Community Champion
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 |
|---|---|
| 79 | |
| 48 | |
| 35 | |
| 31 | |
| 27 |