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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
antel1
Frequent Visitor

Adding Certain Rows from a Summary Table

Hi all,

I've made a summary table of averages for different categories. I'm trying to create a measure that only adds certain rows of that table.

This is my attempt so far.

 

test =
VAR averageingtable =
SUMMARIZE(
        CaseHistory,
        CaseHistory[OPName],
        "AverageOpTime",
        [AvgOpFiltered]
    )
RETURN
CALCULATE(
SUMX(averageingtable,[AverageOpTime]/60),
[OPName] = "OP20" || [OPName] = "OP30"
)

The final line of code below returns an error as it doesn't recognise the row OPName from the summary table.

[OPName] = "OP20" || [OPName] = "OP30"

 

Is there any way to refer to the first column of the summary table I've created? Using CaseHistory[OPName] instead just sums up all the rows so is not an option.

Thanks

 
1 ACCEPTED SOLUTION
antel1
Frequent Visitor

Found a solution in case anyone else has this problem.

test = 
VAR averageingtable = 
    SUMMARIZE(
		FILTER(
            CaseHistory,
            CaseHistory[OPName] = "OP20" || CaseHistory[OPName] = "OP30"
        ),
		CaseHistory[OPName],
		"AverageOpTime",
		[AvgOpFiltered]
	)
 RETURN
        SUMX(averageingtable,[AverageOpTime]/60)

I filtered the data before I calculated the table which did the trick.

View solution in original post

1 REPLY 1
antel1
Frequent Visitor

Found a solution in case anyone else has this problem.

test = 
VAR averageingtable = 
    SUMMARIZE(
		FILTER(
            CaseHistory,
            CaseHistory[OPName] = "OP20" || CaseHistory[OPName] = "OP30"
        ),
		CaseHistory[OPName],
		"AverageOpTime",
		[AvgOpFiltered]
	)
 RETURN
        SUMX(averageingtable,[AverageOpTime]/60)

I filtered the data before I calculated the table which did the trick.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.