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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.