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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
LauritzPBI_O
Frequent Visitor

Help with filtering table based on filter string

I hope someone can help with this problem.

So I'm trying to create a DAX measure, that needs to filter some account numbers in a table based on a string.
The string contains both ranges and specific account numbers, and looks like this:
01011..01090|01901..01902|01904..01959|01980..01998 

I can then fetch that value in my measure with this variable:

VAR FilterString =
    CALCULATE(
        SELECTEDVALUE( 'Account Schedule'[Totaling]),
        'Account Schedule'[Row No_] = "01090"
    )

However, how do i then translate that string into a useable filter?

5 REPLIES 5
tamerj1
Super User
Super User

Hi @LauritzPBI_O 

would you please clarify a bit more. Which column is which. Would be great if you could provide some sample data along with the expected result. 

Hey thanks for looking into it!
I couldn't seem to attach a file here, so I've made the simplified dataset as a table here.
So ideally I need to sum the values in the "Amount" column, but only for the accounts in "AccountNo" column, that has to be filtered by the filterstring.

AccountNoAmount
01001100
01005100
01010100
01020100
01021100
01022100
01023100
01024100
01025100
01026100
01027100
01028100
01029100
01030100
01031100
01032100
01033100
01034100
01035100
01037100
01039100
01080100
01085100
01090100
01100100
01105100
01110100
01115100

 

@LauritzPBI_O 

You may upload to any cloud or file transfer service and share the download link. 

Ahh my bad!

Here's a link for the example file, its a simple Excel file with two columns

https://www.dropbox.com/scl/fi/asyxrlaf1kr6tfgu9kkzp/Example_Accounts.xlsx?dl=0&rlkey=oqnjelwsff4pr1...

@LauritzPBI_O 
Apologies, perhaps I did not clarify my question. The sample data placed in your previous reply was just fine. However, the other table that contains the combination string was (and still) missing. 

I'm trying to match between your written description of the requirement and the measure/column that you have provided in order to completely understand what exactly do you have and what exactly are trying to accomplish.

The measure/column that you have provided in you original post says the following

VAR FilterString =
    CALCULATE(
        SELECTEDVALUE'Account Schedule'[Totaling]),
        'Account Schedule'[Row No_] = "01090"
    )
 
Now the sample data that you have provided contains two columns that are not part of you measure's DAX code! 
 
All that is requirement from your side is provide a clear description of your available inputs and the required output(s). Therefore I was asking for a sample PBIX file that contains samples of all involved tables and relationships (if any) along with measures/calculated columns and one hand written example that explains what are you trying to achieve.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)