cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marculos Frequent Visitor
Frequent Visitor

Count of True / False

Hi, 

 

I am struggling trying to get count of true/false to work. I have tried several different methods. 

 

So I have e.g

 

User                          Acquired

a                               True

a                               True

a                               True

b                               True

b                               True

c                                True

d                                True

 

I want number of Trues to be 4 not 7. Any ideas on how to achieve this ? Appreciate any help !

 

Have tried


DistinctAcquiredCount = COUNTROWS(FILTER('tblZerion_C2', tblZerion_C2[acquired_status]='True'))

 

and

 

CALCULATE(
COUNTA('tblZerion_C2'[acquired_status]),
'tblZerion_C2'[acquired_status] IN { "True" }
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
prateekraina New Contributor
New Contributor

Re: Count of True / False

Hi @marculos,

 

1. First make sure the data type of Acquired column is set to Text

 

    Capture.PNG

 

2. Use the below measure to get the desired result.

 

    

Measure =
CALCULATE (
    DISTINCTCOUNT ( Table1[User] ),
    FILTER (
        Table1,
        Table1[Acquired] = "True"
    )
)



Regards,
Prateek Raina 

View solution in original post

2 REPLIES 2
prateekraina New Contributor
New Contributor

Re: Count of True / False

Hi @marculos,

 

1. First make sure the data type of Acquired column is set to Text

 

    Capture.PNG

 

2. Use the below measure to get the desired result.

 

    

Measure =
CALCULATE (
    DISTINCTCOUNT ( Table1[User] ),
    FILTER (
        Table1,
        Table1[Acquired] = "True"
    )
)



Regards,
Prateek Raina 

View solution in original post

marculos Frequent Visitor
Frequent Visitor

Re: Count of True / False

Brilliant @prateekraina works great many thanks !!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 217 members 2,243 guests
Please welcome our newest community members: