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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Sathvik123
Helper V
Helper V

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

@Sathvik123 ,

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

@Sathvik123 ,

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.