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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jonnyA
Responsive Resident
Responsive Resident

Is it possible to create a formula that will only bring back Provider Names A through M?

I created a Power BI report for a client, but the data in the table was going beyond the bottom of the page.

 

The Client wants the data to all be on 1 page.

 

So, I created 2 separate tables.  One table with Provider Names A through M.  Then another table that brings back Provider Names N through Z.  

 

I created the tables by using the Basic Filter option under Filters.  The problem with Basic Filtering is that new Provider Names are always being added, so this would result in a lot of manual upkeep to these tables.

 

Is it possible to create a formula that will only bring back Provider Names A through M?  Then another formula for N through Z?

 

I assume you will only need the dataset name and Provider Name to write the formula. 

 

If there is anything else I am forgetting let me know and I will provide the information you need!

 

Thank you in advance!

1 ACCEPTED SOLUTION
samdthompson
Memorable Member
Memorable Member

Hello, you could attack this with a calculated column on the supplier table. Something like

 

LetterGroup=
VAR letter= LEFT(SupplierTable[SupplierName],1)
RETURN
SWITCH( letter,"a","a-m","b","a-m"........."n","n-z","o","n-z".....)

 

then just use that as a filter on each page. Alternately you could do that all in power query.

Cheers,

 

 

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @jonnyA 

I create a sample , you can see if it can meet your needs .

(1)In Power Query , use Extract function to return the first letter of the name .

Ailsamsft_0-1638944492307.png

Ailsamsft_1-1638944492308.png

(2)Go back to Desktop view ,and then create two tables with DAX .

A-M = CALCULATETABLE('Table','Table'[First Characters] in {"a","b","c","d","e","f","g","h","i","j","k","l","m"})
N-Z = CALCULATETABLE('Table','Table'[First Characters] in {"n","o","p","q","r","s","t","u","v","w","x","y","z"})

You will get two tables like the screenshot :

Ailsamsft_2-1638944492310.png

You can also add slicers with column [First Characters] field from corresponding tables .

Ailsamsft_3-1638944492313.png

I have attached my pbix file ,you can refer to it .

 

Best Regard

Community Support Team _ Ailsa Tao

samdthompson
Memorable Member
Memorable Member

Hello, I had to make some assumptions around your data structure. I am assuming you have say a fact table and a related supplier table. The formula I described earlier would be on the supplier table. If you only have the one giant table, you could put it there but I would reccomend splitting out dimensions from facts.

Cheers

// if this is a solution please mark as such. Kudos always appreciated.
samdthompson
Memorable Member
Memorable Member

Hello, you could attack this with a calculated column on the supplier table. Something like

 

LetterGroup=
VAR letter= LEFT(SupplierTable[SupplierName],1)
RETURN
SWITCH( letter,"a","a-m","b","a-m"........."n","n-z","o","n-z".....)

 

then just use that as a filter on each page. Alternately you could do that all in power query.

Cheers,

 

 

// if this is a solution please mark as such. Kudos always appreciated.

@samdthompson 

Thank you for your response.  

But what would the Formula look like?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.

Top Solution Authors