In this scenario, lets say we have a simple table and we want to do formatting of consecutive rows with a specific color then with the help of index table and simple dax we can acheive this in a short time rather than formatting each and every row.
Let's say I only want background color for odd accounts like 100,300 and so on.
For this, just create a simple index table like this which is shown below
Use the account column from this table and use in the visual. Once this is done, we just to use simple dax to create a color column based the condition.
The dax which will be used is