Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
B_Real
Advocate IV
Advocate IV

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:

 

repeatingrows.JPG

 

 

 

 

 

 

 

 

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?

1 ACCEPTED SOLUTION

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

Maxim Zelensky
excel-inside.pro

View solution in original post

8 REPLIES 8
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

Table.PNG

Greg_Deckler
Super User
Super User

You could create a measure like:

 

QuestionNumberMin = MIN([QuestionNumber])

And use that in place of your QuestionNumber column.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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:

 

repeatingrows1.JPG

 

 

 

 

 

 

 

 

 

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.

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

Maxim Zelensky
excel-inside.pro

Haha, sometimes the simplist of solutions are the best! How did I not see that... cheers @hohlick!

Coming in very late on this, but I have tried this solution using the matrix visual and it is not working. Has this visual been updated since the last post here? The matrix wants to make me drill down to the next field, instead of displaying them in different columns. I found a link from a stackoverflow.com post about the same topic. There are a few images near the bottom of the post showing a table and a matrix visualization. I can't get my matrix to look anything like that, but that is exactly what I am trying to do...

 

https://stackoverflow.com/questions/42334983/how-to-show-value-in-only-first-cell-in-case-of-duplica...

I had the same problem and was able to work through it. Yes, the visualization was changed slightly.

 

Once you have your values set in the row section of your matrix, go to your visualization. In the upper left, click the drilldown "Expand all down one level in the hierarchy" it is the right-side selection that forks. Click that until you get to the bottom level of what you want to see. Then go to the formatting option for the matrix, under "Row Headers" turn "Stepped layout" off.

 

That should list your matrix in a table style look while not repeating the valuse of the left side columns.

Thanks nyland.

 

its helped me a lot to fix my issue 🙂

 

Regards,

Vishnu

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.