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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MartinLucas
Frequent Visitor

Create grid by ID in a large table

Hi,

 

I'm creating a table which contains a large amount of rows (10.000+) and columns (20+).

The data has recurring observations for unique ID's - the table is sorted by the ID's.

I need to be able to differentiate the IDs for each row and would like to do that with a grid.

 

Is it possible to create top + bottom grids for each unique ID?

 

Br,

Martin

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @MartinLucas 

 

According to my research, for a table visual, the grid cannot do this.


Maybe you can use conditional formatting, first create an index column, and then create a measure for conditional formatting. Then apply conditional formatting to the ID field.

 

measure:

Measure = 
var _currentID=MAX('Table'[ID])
var _Index=MAX('Table'[Index])
var _pre1=CALCULATE(MAX('Table'[ID]),FILTER(ALL('Table'),'Table'[Index]=_Index-1))
var _next1=CALCULATE(MAX('Table'[ID]),FILTER(ALL('Table'),'Table'[Index]=_Index+1))
var _if=IF(
    // OR(_currentID<>_pre1,_currentID<>_next1),"pink")
    _currentID<>_next1,"pink")
return _if

Result:

vangzhengmsft_1-1635160359304.png

Please refer to the attachment below for details.

 

Or you could try to do this with a matrix visual.

It will looks like this:

vangzhengmsft_0-1635159392550.png

 

Best Regards,
Community Support Team _ Zeon Zheng


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

 

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @MartinLucas 

 

According to my research, for a table visual, the grid cannot do this.


Maybe you can use conditional formatting, first create an index column, and then create a measure for conditional formatting. Then apply conditional formatting to the ID field.

 

measure:

Measure = 
var _currentID=MAX('Table'[ID])
var _Index=MAX('Table'[Index])
var _pre1=CALCULATE(MAX('Table'[ID]),FILTER(ALL('Table'),'Table'[Index]=_Index-1))
var _next1=CALCULATE(MAX('Table'[ID]),FILTER(ALL('Table'),'Table'[Index]=_Index+1))
var _if=IF(
    // OR(_currentID<>_pre1,_currentID<>_next1),"pink")
    _currentID<>_next1,"pink")
return _if

Result:

vangzhengmsft_1-1635160359304.png

Please refer to the attachment below for details.

 

Or you could try to do this with a matrix visual.

It will looks like this:

vangzhengmsft_0-1635159392550.png

 

Best Regards,
Community Support Team _ Zeon Zheng


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

 

amitchandak
Super User
Super User

@MartinLucas The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

An example of how I would like the grid follows here:

 

ID       Time period

1         1

1         2

1         3

1         4

2         1

2         2

3         3

4         2

4         3

4         4

 

 

Is it possible to do a "dynamic" grid, where each ID in the data is framed by the grid?

 

Br,

Martin 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors