Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
I am working on trying to create a table within a measure, which has multiple columns which are subsequently calculated within the measure and am having trouble within the generated table referencing the other columns for calculations.
The reason I am building a table within a measure to perform these calculations is some depend on values passed from measures and I want the calculations to be dynamic. I built the calculations in calculated columns previously but those do not recalculate/adjust when the parameters are changed.
My formula for the measure is:
Measure First Shift Util =
var table1 = ADDCOLUMNS(
SUMMARIZE(Order_Data,Order_Data[FIXED_DATE], "Lines", COUNTROWS(Order_Data)),
"Hours_Required", [Lines] / 'SummarizedDays'[Design Lines per Hour],
"Shifts_Required", CEILING([Hours_Required]/'HoursPerShift'[HoursPerShift Value],'HoursPerShift'[HoursPerShift Value]),
"First_Shift_Utilization", If([Shifts_Required] = 1, [Lines]/(HoursPerShift[HoursPerShift Value]*[Design Lines per Hour]),1))
return AVERAGEX(table1,[First_Shift_Utilization])
Currently I am able to reference [Lines] within the measure but the references to the [Hours_Required], [Shifts_Required], and [First_Shift_Utilization] cannot be found or may not be used in this expression.
Any help/suggestions are greatly appreciated.
Solved! Go to Solution.
I figured out that the measure can't reference the columns while they are being created in that format.
In order to build the table I was trying to create in the measure, and have the subsequent columns calculate with values present in the other columns, I needed to do the following:
Measure First Shift Util =
var table1 = ADDCOLUMNS(ADDCOLUMNS(ADDCOLUMNS(SUMMARIZE(Order_Data,Order_Data[FIXED_DATE], "Lines", COUNTROWS(Order_Data)), "Hours_Required", [Lines] / 'SummarizedDays'[Design Lines per Hour]), "Shifts_Required", CEILING([Hours_Required]/'HoursPerShift'[HoursPerShift Value],'HoursPerShift'[HoursPerShift Value])),"First_Shift_Utilization", If([Shifts_Required] = 1, [Lines]/(HoursPerShift[HoursPerShift Value]*[Design Lines per Hour]),1))
return AVERAGEX(table1,[First_Shift_Utilization])This allowed the columns to be added one-by-one and then the columns could reference other columns addde in earlier ADDCOLUMNS() operations.
I figured out that the measure can't reference the columns while they are being created in that format.
In order to build the table I was trying to create in the measure, and have the subsequent columns calculate with values present in the other columns, I needed to do the following:
Measure First Shift Util =
var table1 = ADDCOLUMNS(ADDCOLUMNS(ADDCOLUMNS(SUMMARIZE(Order_Data,Order_Data[FIXED_DATE], "Lines", COUNTROWS(Order_Data)), "Hours_Required", [Lines] / 'SummarizedDays'[Design Lines per Hour]), "Shifts_Required", CEILING([Hours_Required]/'HoursPerShift'[HoursPerShift Value],'HoursPerShift'[HoursPerShift Value])),"First_Shift_Utilization", If([Shifts_Required] = 1, [Lines]/(HoursPerShift[HoursPerShift Value]*[Design Lines per Hour]),1))
return AVERAGEX(table1,[First_Shift_Utilization])This allowed the columns to be added one-by-one and then the columns could reference other columns addde in earlier ADDCOLUMNS() operations.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 46 | |
| 44 | |
| 29 | |
| 20 |
| User | Count |
|---|---|
| 202 | |
| 130 | |
| 102 | |
| 71 | |
| 55 |