cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
oscarca
Helper I
Helper I

Is "Nameof" function supported in Visual studios Tabular project ?

Hello Community,

 

I am trying to set up field parameters following this guide :"https://p3adaptive.com/2022/05/completing-the-set-up-field-parameters-using-tabular-editor/" inside Visual Studios 2019 tabular Project. The issue that I am facing is when I try to create the Calculatated table using the "Nameof" function for example ={("Item",Nameof('Dim_Item',[Item]),0)}. It doesn't specify the the error more than that it underlines "Nameof" with red. Isn't "Nameof" supported in Visual Studios 2019 ?

 

Best regards,

Rubrix

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@oscarca , In power bi it was supported recently. I think you should use recent version of studio too



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @oscarca ,

Visual Studio 2019 version is higher than Visual Studio 2019 16.3 support for nameof.refer:

https://visualstudiomagazine.com/articles/2019/09/05/vs2019-16-3-preview.aspx 

 

And the NameOf operator is available in Visual Basic 14 and later.Visual Studio 2019 the latest version  is Visual Basic 16.9 .

 

 

Best Regards

Lucien

 

 

Thank you for your response !

amitchandak
Super User
Super User

@oscarca , In power bi it was supported recently. I think you should use recent version of studio too



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Thank you !

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors