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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Dicken
Post Prodigy
Post Prodigy

Question mark as operator


Hi, can someone explain what ? does  in m code,  I know  ?? can coalesce a  null ot a vlalue  so ; 

= List.Accumulate( {1..10}, {} , (s,c)=> 
  s &  { ( List.Last(s)?? 0 ) + c } )

but i'm not sure what ?  actually does, i been trying to come up with somthing where i use ?  and get 
differenct result from not useing iit, so i presume   null or erorr. 

Richard. 

1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

It returns null instead of an error message when referencing a missing record field, list item, or column.

 

Examine the code below and see how the results change from null to error if you remove the `?` from the relevant records:

[Source=Table.FromColumns({{1,2,3}},type table[Column1=Int64.Type]),
    x=Source[Column2]?,
    y=Table.Column(Source,"Column1"){3}?]

 

View solution in original post

1 REPLY 1
ronrsnfld
Super User
Super User

It returns null instead of an error message when referencing a missing record field, list item, or column.

 

Examine the code below and see how the results change from null to error if you remove the `?` from the relevant records:

[Source=Table.FromColumns({{1,2,3}},type table[Column1=Int64.Type]),
    x=Source[Column2]?,
    y=Table.Column(Source,"Column1"){3}?]

 

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.