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

Reply
sean_cochran
Helper II
Helper II

Unable to reference LINESTX table output using SELECTCOLUMN

UPDATE: sample file here. Look at the DAX Query View. I'm developing a calculation item, but using the DAX Query View for testing purposes.

 

I have stored the output of a LINESTX function (which is a table) in a variable:

 

 

// Calculate regression line based on measureTable
VAR line = LINESTX( measureTable, [Y], [X], TRUE)

 

 

This outputs a table of values as expected:

sean_cochran_1-1706801769985.png

 

However, when I try to extract specific values from that table using "SELECTCOLUMNS", the columns [Slope1] and [Intercept] are not recognized:

sean_cochran_0-1706801895181.png

Does anyone have any idea what I might be doing wrong?

 

1 ACCEPTED SOLUTION

@sean_cochran,

 

It appears there is a bug in the DAX editor. When I view the calculation item in Tabular Editor, it doesn't contain an error. See if you can use the calculation item successfully.

 

DataInsights_0-1707151323954.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
DataInsights
Super User
Super User

@sean_cochran,

 

Try adding the name of the new column:

 

VAR slope = SELECTCOLUMNS ( line, "Slope1", [Slope1] )

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Same result:

sean_cochran_0-1707143392382.png

 

@sean_cochran,

 

It appears there is a bug in the DAX editor. When I view the calculation item in Tabular Editor, it doesn't contain an error. See if you can use the calculation item successfully.

 

DataInsights_0-1707151323954.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




The calculation item worked. I'm very surprised - normally I'm the one at fault. Is there an official process to report bugs like this?

@sean_cochran,

 

Glad to hear it works. You can report the issue at the link below:

 

https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.