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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
akwang
Advocate II
Advocate II

Count of True / False Issue

Hi So I had posted this issue @

https://community.powerbi.com/t5/Desktop/DAX-IF-Criteria/m-p/488629#M227706

 

From that i had solved an issue to display in a table visualisation those meeting 3 criterias i had listed. However, when i place my measure for the criteria on a card, i get True instead of the count of those meeting the criterias. From the table, i can count that 10 persons met the criteria as seen below:

 

Screenshot_1.png

But as you can see 72 is the total not 10.

 

My measures are:

 

See my measures below. I think it is the PassOverall Measure that has the problem since when on a card it says TRUE instead of giving me the count which is 10.

 

PassOverAll = (AND(AND([PassMath],[PassEng]),[Pass3 Others]))

 

PassMath = CALCULATE(
    COUNTROWS('90080-Laventure Results'),
    ALLEXCEPT('90080-Laventure Results', '90080-Laventure Results'[Candidate #], '90080-Laventure Results'[Subject]),
    '90080-Laventure Results'[Subject] = "MATH",
    '90080-Laventure Results'[Pass Exam] = "pass"
)>0

 

PassEng = CALCULATE(
    COUNTROWS('90080-Laventure Results'),
    ALLEXCEPT('90080-Laventure Results', '90080-Laventure Results'[Candidate #], '90080-Laventure Results'[Subject]),
    '90080-Laventure Results'[Subject] = "ENGA",
    '90080-Laventure Results'[Pass Exam] = "pass"
) >0

 

Matriculation = DIVIDE([PassOverAll],[Total Candidates])

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @akwang

 

You may try to create a measure to get the total as below:

Measure =
VAR a =
    SUMMARIZE ( Table, Table[Candidate], "a1", [PassOverAl] )
RETURN
    COUNTROWS ( FILTER ( a, [a1] = TRUE () ) )

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @akwang

 

You may try to create a measure to get the total as below:

Measure =
VAR a =
    SUMMARIZE ( Table, Table[Candidate], "a1", [PassOverAl] )
RETURN
    COUNTROWS ( FILTER ( a, [a1] = TRUE () ) )

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

WOW that worked!!! Thank you very much @v-cherch-msft

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.