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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
yasbos
Resolver I
Resolver I

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 I
Resolver I

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.