Forum Discussion

tecumseh's avatar
tecumseh
Icon for Resolver III rankResolver III
1 year ago
Solved

CountRows Returns Six Should Only Be Five

Hi all,

Using PBID Oct, 2024
Can you think of any reason why CountRows would return 6 when I can look at the Table in Table View and see only 5 rows?

I created a new pbix added 5 rows of gibberish - here CountRows returns 5
Back to my production pbix - still returning 6

Any ideas?
Thanks

-w

 

DAX Query View

DEFINE
MEASURE '_Measures'[Rows_Channels] = COUNTROWS(VALUES(Channel[Channel]))

EVALUATE
SUMMARIZECOLUMNS(
"Count_Cols", '_Measures'[Rows_Channels]
)
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi tecumseh ,

     

    Do you mean that you have six rows in your data, but the table visual only shows five rows? Check for duplicate rows, which may be caused by PowerBI automatically ignoring duplicate rows when fields are placed. You can solve this problem by adding the index column.

     

    For example. You can hide it by adjusting the background color and font color of the index column or manually adjusting the column width.

    If I don't understand correctly, please provide some sample data and screenshots that will help me reproduce the problem and provide a solution.

     

     

     

    Best regards,

    Mengmeng Li

3 Replies

  • Hi,

    No, cannot think of a reason but this simple measure should give you the perfect answer

    Measure = countrows(Data)

    Also, check the filters which you have applied to the visual/page/all pages.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tecumseh ,

     

    Do you mean that you have six rows in your data, but the table visual only shows five rows? Check for duplicate rows, which may be caused by PowerBI automatically ignoring duplicate rows when fields are placed. You can solve this problem by adding the index column.

     

    For example. You can hide it by adjusting the background color and font color of the index column or manually adjusting the column width.

    If I don't understand correctly, please provide some sample data and screenshots that will help me reproduce the problem and provide a solution.

     

     

     

    Best regards,

    Mengmeng Li