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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
tgraves
Regular Visitor

Reset Counter

I have a report where I have 3 tables, the tables are lined up side by side.  

 

Each table only shows results for the corresponding number.  Table 1 = Number 1, etc.

 

Each table has a name and a picture

 

Table 1Table 1 Table 2Table 2 Table 3Table 3
        
        

 

In the table 

NameImgNumber
Johnimage1.jpg1
Joe image2.jpg2
Sam image3.jpg3
Jake image4.jpg1
Michelle image5.jpg2
   

In sql I can do row number and have it restart number at 3.  But the numbers don't update when you filter in powerbi.

 

I need to do the same thing in powerbi so that it is dynamic.  So if I filter on location it removes the users and updates the number.

 

I feel like this should be something simple but I am not having any luck.  

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

Hi @tgraves ,

 

Please try:

First unpivot the table:

vjianbolimsft_0-1672715182937.png

Then use this table to create a slicer

Apply the measrue:

Number = 
var _a = LEFT(MAX('Table (2)'[Img]),LEN(MAX('Table (2)'[Img]))-4)
var _b = RIGHT(_a,LEN(_a)-5)
var _c = COUNTROWS('Table (3)')
var _d = MOD(_b,_c)
return IF(_d=0,_c,MOD(_b,_c))

Final output:

vjianbolimsft_0-1672722646511.png

vjianbolimsft_1-1672722657651.png

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @tgraves ,

 

Please try:

First unpivot the table:

vjianbolimsft_0-1672715182937.png

Then use this table to create a slicer

Apply the measrue:

Number = 
var _a = LEFT(MAX('Table (2)'[Img]),LEN(MAX('Table (2)'[Img]))-4)
var _b = RIGHT(_a,LEN(_a)-5)
var _c = COUNTROWS('Table (3)')
var _d = MOD(_b,_c)
return IF(_d=0,_c,MOD(_b,_c))

Final output:

vjianbolimsft_0-1672722646511.png

vjianbolimsft_1-1672722657651.png

Best Regards,

Jianbo Li

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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