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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
RYU209
Helper III
Helper III

How to view SELECTCOLUMNS Table?

Hello,

How can I visualize the table created by the SELECTCOLUMNS function? I'd like to make sure that my function is behaving as intended. 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @RYU209 

Based on my understanding of your requirements description, it seems that you have defined a virtual table using Var virtual in a DAX expression, but are not sure what its output value is, and want to visualize it to determine the output and verify before doing the next step, right? If this is the case, you can try to directly create an entity calculation table, and display the Var virtual definition of a virtual table to ensure that it is correct before doing the next step, which is also a very practical trick for our DAX developers to debug code when doing these complex DAX logic development.

vyueyunzhmsft_0-1674096481604.png

For the DAX function you use SELECTCOLUMNS, it can be used to return a table with selected columns from the table and new columns specified by the DAX expressions, if you still have any difficulties and need help, you can refer to this official document first:
SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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-yueyunzh-msft
Community Support
Community Support

Hi , @RYU209 

Based on my understanding of your requirements description, it seems that you have defined a virtual table using Var virtual in a DAX expression, but are not sure what its output value is, and want to visualize it to determine the output and verify before doing the next step, right? If this is the case, you can try to directly create an entity calculation table, and display the Var virtual definition of a virtual table to ensure that it is correct before doing the next step, which is also a very practical trick for our DAX developers to debug code when doing these complex DAX logic development.

vyueyunzhmsft_0-1674096481604.png

For the DAX function you use SELECTCOLUMNS, it can be used to return a table with selected columns from the table and new columns specified by the DAX expressions, if you still have any difficulties and need help, you can refer to this official document first:
SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Thank you! This works perfectly. 

FreemanZ
Super User
Super User

hi @RYU209 

use the similar code like

Table = SELECTCOLUMNS(...)

to create a calculated table?

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.