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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

MID function with a dynamic start point

Hi

Im trying to run a MID where starting points depends on every row, that's why is link to column instead of having a fixed value. But for some reason, I get an error. You know how can I make it work?

 

B = mid('Campaign (1)'[Labels on Campaign], 'Campaign (1)'[A], 10)
 
'Campaign (1)'[A] is where I calculate the start point of each row.

 

2019-07-31 18_25_29-Presentation1 - PowerPoint.png

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

I'm apologize that this formula lacks a ")". Please try the formula again.

Column =
IF (
    ISERROR ( MID ( 'Campaign (1)'[Labels on Campaign], 'Campaign (1)'[A], 10 ) ),
    BLANK (),
    MID ( 'Campaign (1)'[Labels on Campaign], 'Campaign (1)'[A], 10 )
)

Best Regards,

Xue

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

Best Regards,
Xue Ding
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
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Please check if there is null and zero in the column of A. The positions start at 1. So null values and zero are not supported. This is the document of MID you can reference.

Column = IF(ISERROR(MID('Campaign (1)'[Labels on Campaign], 'Campaign (1)'[A], 10),BLANK(),MID('Campaign (1)'[Labels on Campaign], 'Campaign (1)'[A], 10))

Best Regards,

Xue

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks, Xue

 

I tried your formula but didn't work.

I've checked and column A has some blank cells.

2019-08-01 12_57_54-Presentation1 - PowerPoint.png

Hi @Anonymous ,

I'm apologize that this formula lacks a ")". Please try the formula again.

Column =
IF (
    ISERROR ( MID ( 'Campaign (1)'[Labels on Campaign], 'Campaign (1)'[A], 10 ) ),
    BLANK (),
    MID ( 'Campaign (1)'[Labels on Campaign], 'Campaign (1)'[A], 10 )
)

Best Regards,

Xue

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

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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
Top Kudoed Authors