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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
ChrisFromOhio
Helper I
Helper I

Filter SSAS Dax Query based on List of Values

Hello - like the title says, I have a SSAS Dax Query (Import) that I am trying to add a condition based on another list of values. These values are currently stored in an excel file. Right now, I'm importing all the rows of data (millions), then filtering the list down to the ~50k rows I need using the other query. Is it possible to use this list of values I need filtered on in the original query?

1 ACCEPTED SOLUTION

Apply List directly in your query, This works for me

HarshSathwara19_1-1726833266071.png

 

let
    Source = YourOtherDataSource,
    FilteredRows = Table.SelectRows(Source, each List.Contains(MyList, [YourColumn]))
in
    FilteredRows

 

Best Regards,
HSathwara


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

3 REPLIES 3
HarshSathwara19
Frequent Visitor

Hi @ChrisFromOhio Yes, it's possible to filter the data in your query based on the list of values stored in your Excel file directly,

Follow the instructions in the ScreenCapture and let me know If it works for you or not

HarshSathwara19_0-1726754708877.png

 

Thank you for the reply. How do I go about taking my list of values and converting that to a parameter, as this list can and will update from time to time.

Apply List directly in your query, This works for me

HarshSathwara19_1-1726833266071.png

 

let
    Source = YourOtherDataSource,
    FilteredRows = Table.SelectRows(Source, each List.Contains(MyList, [YourColumn]))
in
    FilteredRows

 

Best Regards,
HSathwara


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

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.