none
Filed data calculation RRS feed

  • Question

  • Hi all,
    I'm a begginer in Power BI and I'm trying to find a way to count all the occurence in a column.
    I try to explain my needed, I've as data source a CSV file where some columns report a status (true or false) I need to count this occurrences but I was not able to do it...
    i've tried doing a table and set as value these columns but I receive as result 2 or the count of the rows, I would like to have the count for true and false entries. Does anyone can help me ?

    Friday, March 6, 2020 12:49 PM

Answers

  • I'm trying to add data in a table and doing right click on the field I select "new measure"
    This is the right way ?

    I don't know if it is the right way but adding to a table all the fields I need and select to display count of them and then adding just one of this fields again I've obtained a table like these:

    State ActiveSync Imap Pop3
    Enable 124 52 73
    Disable 15 23 45

    That is what I need to display :)

    • Edited by OttobreRosso Thursday, March 12, 2020 9:31 AM
    • Marked as answer by OttobreRosso Thursday, March 12, 2020 11:16 AM
    Thursday, March 12, 2020 9:23 AM

All replies

  • I may have misunderstood, this would be for a measure.

    Try 

    = CALCULATE(COUNT('Table Name'[Field Name]),'Table Name'[Field Name] = "True")

    Are you trying to do this in Power Query?



    Friday, March 6, 2020 1:33 PM
  • I'm trying to add data in a table and doing right click on the field I select "new measure"
    This is the right way ?
    Monday, March 9, 2020 3:22 PM
  • I'm trying to add data in a table and doing right click on the field I select "new measure"
    This is the right way ?

    I don't know if it is the right way but adding to a table all the fields I need and select to display count of them and then adding just one of this fields again I've obtained a table like these:

    State ActiveSync Imap Pop3
    Enable 124 52 73
    Disable 15 23 45

    That is what I need to display :)

    • Edited by OttobreRosso Thursday, March 12, 2020 9:31 AM
    • Marked as answer by OttobreRosso Thursday, March 12, 2020 11:16 AM
    Thursday, March 12, 2020 9:23 AM