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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
olimilo
Continued Contributor
Continued Contributor

Trying to create a filtered list from another table

I'm trying to create a column with a list of holidays (l_Holidays) for my main table (Source) using an existing Holiday table. But upon checking, it always returns an empty list (which should not be the case). Anyone know what I'm doing wrong here? The holiday list returned should be the holidays for that country.

 

= Table.AddColumn(
    Source,
    "l_Holidays",
    each Table.Column(Table.SelectRows(Holiday, each Holiday[Country] = [Country]),
    "Date")
)
1 ACCEPTED SOLUTION

Hello @olimilo 

 

I created a small example to test.

Seemingly it works

Please check the attached Excel file

 

flost.png

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

@olimilo 

 

try this modification

 

= Table.AddColumn(
    Source,
    "l_Holidays",
    each let mycountry=[Country] in Table.Column(Table.SelectRows(Holiday, each [Country] = mycountry),
    "Date")
)

Hi @Zubair_Muhammad ,

I tried your edit and am still getting blank lists for each row. Do you know what could be the problem here?

 

Hello @olimilo 

 

I created a small example to test.

Seemingly it works

Please check the attached Excel file

 

flost.png

Thanks @Zubair_Muhammad 

I was able to make it work from my side and was able to add a couple more conditions in. Not exactly sure what went wrong though.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.