Forum Discussion

B_Real's avatar
B_Real
Icon for Advocate IV rankAdvocate IV
9 years ago
Solved

Repeating rows in a table, show only first row

In a table visualisation, repeating rows will include the value on every row, such as this:

 

 

 

 

 

 

 

 

 

Here there are 7 questions in a Care Profile Assessment. Repeating 'Care Profile Assessment' on every row is not easy on the eye. In Tableau, 'Care Profile Assessment' will only appear on the first row, and blank out the remaining rows, which makes it easy to read en masse. 

 

Can this be done in Power BI?

  • You can use "Matrix" visual instead of "Table"

8 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    You could create a measure like:

     

    QuestionNumberMin = MIN([QuestionNumber])

    And use that in place of your QuestionNumber column.

    • B_Real's avatar
      B_Real
      Icon for Advocate IV rankAdvocate IV

      Sorry I should probably have mentioned that I need to display the answers to every question, which are in a separate column not shown in my original image, like this:

       

       

       

       

       

       

       

       

       

       

      Apologies my first post should have been clearer. So a min won't work, because I need to show the question number and the question itself.  So in my example, Name and Created Date' would only appear on the first row alongside QuestionNumber 1. 

       

      In Tableau it removes the repeating values automatically.

      • hohlick's avatar
        hohlick
        Icon for Continued Contributor rankContinued Contributor

        You can use "Matrix" visual instead of "Table"

  • Anonymous's avatar
    Anonymous
    Not applicable

    Please give this response a Thumbs Up if it answered your problem

     

    This is easy to achieve, all you need is a row counter that starts over with each set.  If your data does not have a row number you can use, create one.

    For this example, we want a data dictionary where the table name is only stated once.  Let's use the table INFORMATION_SCHEMA.COLUMNS as an example dataset.  The column ORDINAL_POSITION provides an incrementing value, based on the column sequence in the table.  Create a new column that will test this value.

     

    TableName = IF(AllTableColumns[ORDINAL_POSITION] = 1, AllTableColumns[TABLE_NAME], BLANK())

    Make sure the COLUMN_NAME is set to sort by ORDINAL_POSITION.  The end result is seen in the image