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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Counting rows with multiple values in a column

Hi, I am working on data for HR and I want to calculate the No. of section heads. two columns determine this classification. the  class = "Supervisor" and the other column is grade  = can be 49, 50,51, or 52.

 

i wrote this formula but id does not work 😞

YY4 No of SectionHeads = CALCULATE(COUNTROWS('HR'),'HR'[Class]="Supervisor",'HR-COA'[Grade]="49||50||51||52").
 
I appreciate if one can help.
 
Thanx
2 REPLIES 2
amitchandak
Super User
Super User

@freevission2019 , one of the two ways

YY4 No of SectionHeads = CALCULATE(COUNTROWS('HR'),'HR'[Class]="Supervisor",filter('HR-COA'[Grade], 'HR-COA'[Grade] in{"49","50","51","52"}))

or

YY4 No of SectionHeads = CALCULATE(COUNTROWS('HR'),'HR'[Class]="Supervisor",filter('HR-COA'[Grade] , 'HR-COA'[Grade]="49" || 'HR-COA'[Grade]= "50"
'HR-COA'[Grade] = "51" 'HR-COA'[Grade] ="52"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
wdx223_Daniel
Super User
Super User

'HR-COA'[Grade] in {49,50,51,52}

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.