Forum Discussion

COMtrac's avatar
COMtrac
Advocate I
9 years ago

Adding a row count to a visual table

I was wondering whether there is an easy way to add a count to a column in a visual table in PowerBI Desktop.  The column in the table has text entries and basically I just want to show the total of the column entries at the bottom of the column in the table visual.  For example the screen shot I have attached is where I want to add the total number of entries in the offenece column and show this at the bottom of the offence column

15 Replies

  • Baskar's avatar
    Baskar
    Resident Rockstar

    Simple drag any column at last and choose aggeregation is Count.

     

    Look the image 

    • COMtrac's avatar
      COMtrac
      Advocate I

      Hi Baskar

       

      I was trying to avoid having to add another calcuated column (such as the count column).  Ideally using your image I wantt o count to appear under the Workitam ID rather then having to add another column called Workitem ID Count.

       

      I hope that make sense

      • Baskar's avatar
        Baskar
        Resident Rockstar

        COMtrac

        Ya i got it.

         

        here i have to sorry , because presnetly in power bi we can't get the total value or count without any measure in your table.

         

        Sorry :-(

         

    • Anonymous's avatar
      Anonymous
      Not applicable

      It seems simple and elegant way to count it. 

  • So Sorry to revive an old post, but this was the first option on google, so I'm sure other poeple will land here.

    If you add any column to the table, choose "Count Distinct" as the aggregate function, then rename the column to something short like ".".  I then format that specific column to have values/header the same colour as my background.  It's not perfect, but it works, and it doesn't really add too much to the visual.

     

    • COMtrac's avatar
      COMtrac
      Advocate I

      Thanks Alex for the link.  It contain some good information to healp introduce me to the difference between calculated columns and measures.  I am assuming what I need to do is somehow put a measure in a cell beneath my column that contains text and then come up with a a DAX expression that will simply count the number of cells in the column and give me a total number.  This is where I am a bit stuck on how to make this happen

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello ,
    you got any solution for adding sr. no in table visual , I stuck with same probleam like i want to show total number of rows in the table visual but for some column i used aggregate function like sum ,

    want to display total rows in the table visual like
    Regards ,
    Pooja

     

    Any suggetion ,