Trouble Referencing Columns from other tables

My problem is simple:

In a table I have Column 1= Old Cycle Time (in decimal numbers for seconds)
Column 2= New Cycle Time (in decimal numbers for seconds)

I am trying to create a measure that calculates: 1/ (Column 1 * (Column 1- Column2)).

I cannot get the equation to work and even trying to create a new column with the equation I cannot get it to reference the appropriate columns.

Please help. I hope this is detailed enough!

Hi @stiefel.ed,

Are you attempting this in Power Query or with DAX?
Can you provide a small sample PBIX

Naked column reference isn’t supported in a measure, you have to use some kind of aggregation, such as SUM/MAX/MIN.

Another point to review, are your columns formatted as numbers, or as text?

I am trying it in Both.

Currently I am in Power Query Attempting to pull “Old Cycle Time” into a new table as a column, and “New Cycle Time” as a second column.

I can’t get that to work. I am using
NewCycle = VALUES(‘Case Study Database’ [NewCycleTime])

It says “a table of multiple values was supplied where a single was expected”
How can I just pull other columns into a new table from another table?

This worked for Old Cycle Time column?

You can Merge on a shared key between two tables in Power Query and then extract the desired Column.

.

As for the DAX error VALUES can return both a scalar value and a single column table, like @AntrikshSharma suggested you need some type of aggregation to retrieve a scalar value

1 Like

Numbers
Decimal numbers

I am very new to Power Bi. What is a scalar value?

Think it can best be described as a single value.

“A” or “100” are scalar values
{“A”, “B”, “C”} is a list, comparable to a single column table

to perform a calculation like this: 1/ (Column 1 * (Column 1- Column2)) scalar values are required.
For example: 1/ (5 * (5 - 2))

So then, how would you get this calculation? Do I do it in DAX as a measure? Because I have tried that as well and not been able to figure it out.

I would suggest you go through the beginners DAX videos, it will help you in creating a solid DAX foundations.

I have done that. I guess I will just keep trying. Thank you for trying to help. Seems like it should be easy but I cannot figure it out.

Have you created a relationship between your two tables?

Hi @stiefel.ed,

Have you also worked through the Advanced Data Transformations & Modeling course?
Without a proper model DAX can become really complex…

And if all else fails please check the banner on top of this page “Make sure your Q…” and provide a complete scenario with sample file so members can better assist you.

1 Like

Hi @stiefel.ed, did the response provided by the contributors help you solve your query? If not, how far did you get, and what kind of help you need further? If yes, kindly mark the thread as solved. Thanks!

Hi @stiefel.ed,

Just wanted to give you a heads up on an upcoming event that covers the key concepts of what you’d need to work through. So if you have the time and it fits in your schedule you can register here.

https://enterprisedna.co/power-bi-dax-master-class-november-2020-registration/