Forum Discussion

Riddhi_06's avatar
Riddhi_06
Frequent Visitor
4 years ago

Getting exact column count when columns are more than 1000

How can we get an exact column count when the column count is exceeding 1000 in power bi?
In power query it is shown as 999+
What can be done?

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Riddhi_06 ,

     

    In Power Query you can use the Table.ColumnCount function. So if you load your main data into a table called Table, create a blank query called ColumnCount and use this code in it

    let
        Source = Table.ColumnCount(TableName)
    in
        Source

     

     

    Best Regards,

    Stephen Tao

     

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

     

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Icon for Most Valuable Professional rankMost Valuable Professional

    At the bottom, select Column profiling based on entire data set. Then it will show complete count for the column when you select Column profile.

  • Riddhi_06's avatar
    Riddhi_06
    Frequent Visitor

    Vijay_A_Verma 
    i want the total column count 
    like here in the above screenshot 35 columns are present, if there the value is 999+ for columns
    how to get the exact count 

    • Vijay_A_Verma's avatar
      Vijay_A_Verma
      Icon for Most Valuable Professional rankMost Valuable Professional

      To get exact count, you need to issue following formula where Custom1 should be replaced by previous step

      = Table.RowCount(Custom1)*Table.ColumnCount(Custom1)

      You can also refer to table directly. In below formula, I have pulled the table from SQL Server

      = Table.RowCount(dbo_DimCustomer)*Table.ColumnCount(dbo_DimCustomer)