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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tipu500
Regular Visitor

How to count True and False as a table value

Hi, I have a table like this 

Barcoded
True
False
True

Now, I want to prepare a report and count True= ? and False= ? Another question, can I make alias for True and False so that I table will show the data like this:

CodedCount
Barcoded20
Not Barcoded10

 

Is it possible? Can somebidy help me for this? 

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

Create a calculated column formula

Status = if(Data[Barcoded]=TRUE(),"Barcoded","Not barcoded")

To your Table visual, drag Status to the row labels and write this measure

Measure = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

v-zhangti
Community Support
Community Support

Hi, @tipu500 

 

Please try the following methods.

Column:

Coded = IF([Barcoded]=True,"Barcoded",IF([Barcoded]=FALSE,"Not Barcoded"))

vzhangti_0-1650509890479.png

New Table:

Table 2 = 
SUMMARIZE('Table','Table'[Coded],"Count",COUNT('Table'[Coded]))

vzhangti_1-1650509935847.png

Is this the result you were expecting?

 

Best Regards,

Community Support Team _Charlotte

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-zhangti
Community Support
Community Support

Hi, @tipu500 

 

Please try the following methods.

Column:

Coded = IF([Barcoded]=True,"Barcoded",IF([Barcoded]=FALSE,"Not Barcoded"))

vzhangti_0-1650509890479.png

New Table:

Table 2 = 
SUMMARIZE('Table','Table'[Coded],"Count",COUNT('Table'[Coded]))

vzhangti_1-1650509935847.png

Is this the result you were expecting?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

Create a calculated column formula

Status = if(Data[Barcoded]=TRUE(),"Barcoded","Not barcoded")

To your Table visual, drag Status to the row labels and write this measure

Measure = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors