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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
nicolasvc
Helper III
Helper III

select a row by index and copy in a table

I have 2 tables, the first table with the value of a product per store, and in the second the number of the first week of the year x month, and also the index.

Store Product Value
1A1000
1B500
2A300
2B200

 

index year month week
1202111
2202125
3202139

 

And I need to add these three columns to the first table, but only the one with index 1 as shown. How can I select a row by index?

 

Store Product Value year month week
1A1000202111
1B500202111
2A300202111
2B200202111

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @nicolasvc 

 

Try to add 3 new columns with below codes:

Year = maxx(filter('Table (2)','Table (2)'[index]=1),'Table (2)'[ year])
Month = maxx(filter('Table (2)','Table (2)'[index]=1),'Table (2)'[ month])
Week = maxx(filter('Table (2)','Table (2)'[index]=1),'Table (2)'[ week])
 
VahidDM_0-1634847360278.png

 

 
 

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

Appreciate your Kudos!!


 

View solution in original post

1 REPLY 1
VahidDM
Super User
Super User

Hi @nicolasvc 

 

Try to add 3 new columns with below codes:

Year = maxx(filter('Table (2)','Table (2)'[index]=1),'Table (2)'[ year])
Month = maxx(filter('Table (2)','Table (2)'[index]=1),'Table (2)'[ month])
Week = maxx(filter('Table (2)','Table (2)'[index]=1),'Table (2)'[ week])
 
VahidDM_0-1634847360278.png

 

 
 

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

Appreciate your Kudos!!


 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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