cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nicolasvc
Helper II
Helper II

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
Community Champion
Community Champion

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
Community Champion
Community Champion

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.