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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Expression.Error: We cannot apply operator & to types Number and Record

(I am also posting this here as was suggested to me in my original ticket: https://community.fabric.microsoft.com/t5/Service/Expression-Error-We-cannot-apply-operator-amp-to-t...

What do I want?

I would like to create veeeery basic dataflow and report/dashboard/whatever just to verificate the proof of concept, because my company is currently evaluating which reporting solution to use.

 

How did I get here?

I used PowerBI service for the first time (currently in free trial version). I did not fiddle with any settings.

1) Created and connected my on-premise data gateway to PBI

xixo221_0-1716022319319.png

2) In my workspace I created new dataflow

xixo221_1-1716022539747.png

xixo221_2-1716022563262.png

3) selected data source for my dataflow

xixo221_3-1716022632107.png

xixo221_4-1716022656518.png

xixo221_5-1716022775562.png

(I also checked Navigate using full hierarchy option in advanced options)

4) selected a few tables (doesnt matter which) and clicked Create. As you can see the connection with gateway is working as I can see the DB data.

xixo221_6-1716022959658.png

xixo221_9-1716023413487.png

As you can see I am not doing any transformations. I only selected tables and published dataflow right after.

5) I click on publish button

6) Dataflow gets published and starts to refresh right after, but it always fails in the end (takes roughly 5 minutes).

xixo221_10-1716023614118.png

xixo221_11-1716023896880.png

xixo221_12-1716024017025.png

(btw Error message is partially in my local language even though I explicitly set PowerBI language to english)

Here is the error msg (I translated non english parts to english):

 

sale_order: Error Code: Mashup Exception Expression Error, Error Details: Couldn't refresh the entity because of an issue with the mashup document MashupException.Error: Table insertion failed., InnerException: We cannot apply operator & with types Number a Record., basic error: We cannot apply operator & with types Number a Record. Details: Reason = Expression.Error;Message = We cannot apply operator & with types Number a Record.;Detail = [Operator = "&", Left = 2, Right = [...]];Microsoft.Data.Mashup.Error.Context = System

 

I tried this multiple times even with different tables. But it always fails. (failing tables change).

 

I honestly dont understand the error at all. I didnt do any transformations and I dont have any Record type columns in my tables.

 

And the even weirder thing is that if I have only two tables (even if it were two tables that failed beforehand) in my dataflow then everything works, but as soon as I add more than 2, then I get the error.

 

Additional info

Database (Postgres 15) and data gateway are on the same computer. DB runs in docker with forwarded ports.

 

You can see here that I dont have any Record type columns.

xixo221_13-1716025075529.pngxixo221_14-1716025097059.pngxixo221_15-1716025114287.pngxixo221_16-1716025130270.png

 

 

Status: Investigating

Hi @xixo221 

According to your error message , the "..." what are the specifics in there? You can't directly use the '&' operator to concatenate different types of values. So can you make sure that the values in the table are exactly of the same type? 

Details: Reason = Expression.Error;Message = We cannot apply operator & with types Number a Record.;Detail = [Operator = "&", Left = 2, Right = [...]];

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Investigating

Hi @xixo221 

According to your error message , the "..." what are the specifics in there? You can't directly use the '&' operator to concatenate different types of values. So can you make sure that the values in the table are exactly of the same type? 

Details: Reason = Expression.Error;Message = We cannot apply operator & with types Number a Record.;Detail = [Operator = "&", Left = 2, Right = [...]];

 

Best Regards,
Community Support Team _ Ailsa Tao

xixo221
Regular Visitor

@v-yetao1-msft Thank you so much for your reply.

 

What are the specifics with the [...]?

As you can see in one of the screenshots in my ticket/question above, this [...] is exactly what is in the error message. I did not change it (apart from translation of non english parts of the message).

xixo221_0-1716232862488.png

So can you make sure that the values in the table are exactly of the same type? 

Could you please tell me what exactly should I do or maybe at least narrow my search a little bit?

The only information the error message tells me is the name of the table, not even the column names.

Do you mean that one of the table columns contains data of more than one data type? If so, then I am a little bit skeptical, because the data I am using are 1:1 copy of our information system DB and I did not change them in any way before trying to use them in PBI and I am not doing any transformations in dataflow (to my knowledge) as you can see in screenshots above.

 

I am more than willing to provide more information if needed.

 

What exactly does this mean: [Operator = "&", Left = 2, Right = [...]]; ?

Does this error mean that I am trying to merge/add/concatenate values 2 and [...]?

 

xixo221
Regular Visitor

@v-yetao1-msft I would like to ask about the status of my ticket and if there is anything I can do to make resolution faster/successful.