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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
scd66
Frequent Visitor

Replace repeating row values with blank in a Table Visual

I have a table visual in PowerBI shown below where I have split total room areas into percentages of room owner where the room is shared. Is there a formula that could be written to replace selected repeating row values with a blank? I have a unique column called Room ID Code and want the repeating row to show the Capacity value only once in the first row, for example 'Room No.101 Main Entrance Foyer' shown in the screen shot below is split 50/50% between two owners and it shows a row for each 50% split, and repeats the Capacity value again in the next row. Is there an easy formula that could be written for the Capacity column which would replace the repeated Capacity row value with a blank so it only appears once and I can then have a running total for the Capacity column? Should I take a copy of the column and then apply the formula to that, as some of my calcuated columns for percentage splits of the room areas are referencing the total area of the room in each repeated row and I don't want to mess up the calculations as I also want to replace the repeating total room area duplicates with a blank? I tried using the matrix visual but it was becoming huge when I expanded it as I have so many columns in my visual.

 

scd66_0-1743473004773.png

 

Any advice would be greatly appreciated, thanks.

 

1 ACCEPTED SOLUTION
v-echaithra
Community Support
Community Support

Hi @scd66 ,

As per your data context i have reframed the measure, please try the below DAX measure, make sure you are using field names correctly and let me know if it works.

Capacity Supp =
IF ('Locations UDFs'[Room ID Code] = CALCULATE (MIN ( 'Locations UDFs'[Room ID Code] ),
FILTER ('Locations UDFs','Locations UDFs'[Room ID Code] = EARLIER ( 'Locations UDFs'[Room ID Code] ))),
'Locations UDFs'[Capacity],BLANK())

Regards,
Chaithra

View solution in original post

20 REPLIES 20
v-echaithra
Community Support
Community Support

HI @scd66 ,

May I ask if you have gotten this issue resolved?

 

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Chaithra.

Hi,

 

Sorry I tried your latest formula as a new column but it still said I had a syntax error and it wouldn't run.

Regards,

scd66

Hi @scd66 ,

Please look into the pbix file attatched, where we tried to reproduce the scenario with your sample data.
Compare the Location Notes with Location Notes Display and Functional Suitability with Functional Display.

You can try these below DAX measures to build calculated columns i.e, Location Notes Display and Functional Display.

For Index Column:

Index =
RANKX(
ALL('Locations UDFs'),
'Locations UDFs'[Room ID Code]
& "|" & 'Locations UDFs'[Room Function]
& "|" & 'Locations UDFs'[Activity Tag]
& "|" & FORMAT('Locations UDFs'[% Activity Tag], "0.00"),
,
ASC,
DENSE
)


For Capacity Display Column:

Capacity Display =
VAR CurrentRoomID = 'Locations UDFs'[Room ID Code]
VAR MinRow =
CALCULATE (
MIN ( 'Locations UDFs'[Index] ),
FILTER ( 'Locations UDFs', 'Locations UDFs'[Room ID Code] = CurrentRoomID )
)
RETURN
IF ( 'Locations UDFs'[Index] = MinRow, 'Locations UDFs'[Capacity], BLANK() )

For Location Notes Display:

Location Notes Display =
IF(
ISBLANK('Locations UDFs'[Capacity Display]),
BLANK(),
'Locations UDFs'[Location Notes]
)

For Functional Display column:

Functional Display =
IF(
ISBLANK('Locations UDFs'[Capacity Display]),
BLANK(),
'Locations UDFs'[Functional Suitability]
)

If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.

Regards,
Chaithra.



Could you perhaps show a screenshot showing how the DAX measures look in your sample file in the formula bar and I could try copying?

Thanks but your attachment won't open on my laptop. It produces the following message:

 

scd66_1-1750439785697.png

 

v-echaithra
Community Support
Community Support

Hi @scd66 ,

If the provided answer was helpful, please mark it as "Accept as solution" and click "Yes" if you found it helpful, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @scd66 ,

As per your data context i have reframed the measure, please try the below DAX measure, make sure you are using field names correctly and let me know if it works.

Capacity Supp =
IF ('Locations UDFs'[Room ID Code] = CALCULATE (MIN ( 'Locations UDFs'[Room ID Code] ),
FILTER ('Locations UDFs','Locations UDFs'[Room ID Code] = EARLIER ( 'Locations UDFs'[Room ID Code] ))),
'Locations UDFs'[Capacity],BLANK())

Regards,
Chaithra

v-echaithra
Community Support
Community Support

Hi @scd66 ,

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @scd66 ,

Sorry, I am not able to access the file which you have sent.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

error msg.png

Regards,
Chaithra.

Here is the Excel table version. I want the formula to replace the values in red with a blank

CURRENT FORMAT

Building NameRoom No.Room DescriptionRoom ID Code (Unique ID Column)NIA sqmRoom FunctionActivity Tag% Activity TagNIA Area Used sqmCapacityUniqueLocation NotesFunctional Suitability
BUILDING NAME 101MAIN ENTRANCE FOYER10101019.964WAITING AREAAA1004.9821UniqueWAITING AREAGRADE 2
BUILDING NAME 101MAIN ENTRANCE FOYER10101019.964WAITING AREAB1004.9821Repeating rowWAITING AREAGRADE 2
BUILDING NAME 105ACCESSIBLE TOILET & SHOWER10101055.406SHOWER AREAR1002.7030UniqueACCESSIBLE TOILET & SHOWERGRADE 1
BUILDING NAME 105ACCESSIBLE TOILET & SHOWER10101055.406TOILETS (GENDER NEUTRAL)B1002.7030Repeating rowACCESSIBLE TOILET & SHOWERGRADE 1
    30.74   15.372   
PREFERRED FORMAT            
Building NameRoom No.Room DescriptionRoom ID Code (Unique ID Column)NIA sqmRoom FunctionActivity Tag% Activity TagNIA Area Used sqmCapacityUniqueLocation NotesFunctional Suitability
BUILDING NAME 101MAIN ENTRANCE FOYER10101019.964WAITING AREAAA1004.9821UniqueWAITING AREAGRADE 2
BUILDING NAME 101 1010101 WAITING AREAB1004.982 Repeating row GRADE 2
BUILDING NAME 105ACCESSIBLE TOILET & SHOWER10101055.406SHOWER AREAR1002.7030UniqueACCESSIBLE TOILET & SHOWERGRADE 1
BUILDING NAME 105 1010105 TOILETS (GENDER NEUTRAL)B1002.703 Repeating row  GRADE 1
    15.37   15.371   

 

Hi @scd66 ,

Thank you for providing the sample data.

 

Based on your description, you’re trying to suppress repeating values in a Power BI Table visual for certain columns, such that repeated values in subsequent rows are replaced with blanks for improved readability.

Try to use calculated columns that compare the current row to the first instance of that repeating group, based on the Room ID Code.

Create new calculated columns using the following DAX pattern for each column where you want to hide repeats.

 

Room Description Display =

IF (

'YourTableName'[Room ID Code (Unique ID Column)] =

CALCULATE (

MIN ( 'YourTableName'[Room ID Code (Unique ID Column)] ),

FILTER (

'YourTableName',

'YourTableName'[Room ID Code (Unique ID Column)] = EARLIER ( 'YourTableName'[Room ID Code (Unique ID Column)] )

)

),

'YourTableName'[Room Description],

BLANK()

)

 

and repeat this logic for any of the following columns you want to format this way for Room no. and NIA sqm.

If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.

Regards,
Chaithra.

Sorry I couldn't get your formula to work properly. I think I must have typed it incorrectly. It kept saying I had the syntax wrong. Here is a screenshot of the error message:

 

scd66_1-1749159112116.png

 

I have shown the current format I am getting in PowerBI Table Visual below with the preferred format shown under that with selected repeating row values replaced with a blank. I have been advised that the DAX formula should be:

New column=  if([Index] = minx(filter(Table, [Column1] = earlier([[Column])) , [index]) , [Column2], blank())

 

but I am struggling to apply this formula successfully with the column headers shown below. I'm really just looking for the formula above to be shown using the coulmn headers in the example shown below:

 

scd66_0-1745244951442.png

 

v-echaithra
Community Support
Community Support

Hi @scd66 ,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Hi, Here is a sample of the data in the link below showing the repeating rows and the required result shown below this. I can do this with Crystal Reports by suppressing duplicate row values if the value of the index column equals the earlier, or previous, row, but can't seem to find a similar formula in PowerBI which gives the same result. I think the 'EARLIER' command might work but not sure how to apply this in a formula or what the formula should look like. The aim is to show the Capacity column value only once so that I can have an accurate running total in the table visual, so I would like to replace the repeating values with a 'blank'.

PBI Table Visual Format.xlsx

danextian
Super User
Super User

For this to work, it's essential to identify which columns cause the room number to appear multiple times. The table must be sorted first by room number and then by those columns, as the formula checks whether the values in the current row match those in the previous row. Users should not change the sorting order; otherwise, blanks may appear not only after the first row but also unexpectedly within each room number group. Additionally, multiple tables can introduce further complexity. The key question is: Is this a want or a need?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Here is the format I have in my Table visual with the preferred result shown under it. The Room ID column is the unique identifer used to sort the data, but I don't know how to apply the 'Earlier' formula that replaces the repeating row with a blank if it equals the first unique row.  The values I don't want to repeat are the 'NIA/NUA Room Areas' fields, the 'Capacity' field and the 'Location Notes' fields highlighted in yellow. The Excel file is attached:

PBI Table Visual Format.xlsx

 

scd66_0-1743535803768.png

 

Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Here is the format I have in my Table visual with the preferred result shown under it. The Room ID column is the unique identifer used to sort the data, but I don't know how to apply the 'Earlier' formula that replaces the repeating row with a blank if it equals the first unique row.  The values I don't want to repeat are the 'NIA/NUA Room Areas' fields, the 'Capacity' field and the 'Location Notes' fields highlighted in yellow. The Excel file is attached:

PBI Table Visual Format.xlsx

 

scd66_0-1743535803768.png

 

I am unable to understand your requirement.  Someone who does will help you.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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