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
Anonymous
Not applicable

Count values based on failed subjects

Hello All,

 

I have a table where I have data like below.

Student name and Each subject pass or fail.

 

Sutdent NameTeluguEnglishHindi
MahaPFF
RamaFPP
RajaFFF

 

My requirement is I need to show a filter called failed count to the user.

So If he select 1 from the filter then I need to show Rama as he failed in 1 subject

If I select 2 from the filter then I need to show Maha as he failed in 2 subjects.

If I select 3 from the filter then I need to show Raja as he failed in 3 subjects.

 

I am not able write the DAX calculation for this to get failed count .

Could any one please help how to write this dax calc.

 

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@Anonymous ,

try this in calculated column,

 

Arul_0-1708005476745.png

 

Failed Count = IF(
    'Table'[Telugu] = "F",1,0) + IF(
    'Table'[English] = "F",1,0) + IF(
    'Table'[Hindi] = "F",1,0)

Arul_1-1708005603913.png

 

I have attached the pbix file for you to refer.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

1 REPLY 1
Arul
Super User
Super User

@Anonymous ,

try this in calculated column,

 

Arul_0-1708005476745.png

 

Failed Count = IF(
    'Table'[Telugu] = "F",1,0) + IF(
    'Table'[English] = "F",1,0) + IF(
    'Table'[Hindi] = "F",1,0)

Arul_1-1708005603913.png

 

I have attached the pbix file for you to refer.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


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.