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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
yasbos
Resolver II
Resolver II

Error Related to Summarizecolumns and calculating monthly percentages

Friends. I'm calculating the number of days in the month where the SLA% for that day met or exceeded the SLA% target. I'm then calculating this number as a percentage of the total days MTD. The steps that I'm following are as follow: I use summarize columns to calculate the average SLA per date, and I calculate the average SLA as an added column. I then add a flag column to flag each row (date/SLA) as whether it met the SLA (0/1). I then count the rows with flag=1 and divide that by the total rows, and that gives me the percentage. That works fine for the current month. It only works if I present the result on a card visual. If I try to do it in a table or graph where the x-axis is month, I get the below error. My goal is to present in a graph or a table each month along with the percent of days where the SLA was met during that month. Any hint/suggestion is appreciated. 

 

Error Message:

MdxScript(Model) (705, 35) Calculation error in measure 'Table'[Days SLA Met Against Target]: SummarizeColumns() and AddMissingItems() may not be used in this context.

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

If you want to show by month then you have to summarize by month. Include the month column in your table variable and adjust your measure accordingly.

View solution in original post

2 REPLIES 2
yasbos
Resolver II
Resolver II

Thanks, @lbendlin 

lbendlin
Super User
Super User

If you want to show by month then you have to summarize by month. Include the month column in your table variable and adjust your measure accordingly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.