cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marculos
Regular 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
prateekraina
Memorable Member
Memorable Member

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

3 REPLIES 3
prateekraina
Memorable Member
Memorable Member

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 

works great for me thanks bud. 😄

Brilliant @prateekraina works great many thanks !!

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors