Forum Discussion

tipu500's avatar
tipu500
Regular Visitor
4 years ago
Solved

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? 

  • 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.

  • Hi, tipu500 

     

    Please try the following methods.

    Column:

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

    New Table:

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

    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.

2 Replies

  • 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.

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, tipu500 

     

    Please try the following methods.

    Column:

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

    New Table:

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

    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.