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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Pbiuserr
Post Prodigy
Post Prodigy

SLA calculation shows incorrect values

Hello, 

 

EDIT: I've got root of my problem:

SLA is supposed to be resolved request right. I got plenty of resolved requests but their SLA column is not filled. If I assume that BLANK() is Breached, then it counts nicely, but when I do %SLA and divide it by number of occurencies in SLA column, the blanks are not going to be counted, therefore the denominator is less than suppose to be

-----


I got one table so there is no really datamodel as of yet. I want to calculate SLA, by that I got a column with "Breached" / "Not breached" values and some nulls unfortunately (treated as breached)

 

My formulas are:

#ofTickets = countrows(filter('data', 'data'[CREATED_AT])) - this gives same amount of rows than in column with 'data'[SLA]

#inSLA = countrows(filter('data', 'data'[SLA] = "Not breached"))

#not_in_SLA = countrows(filter('data', 'data'[SLA] = "Breached" || 'data'[SLA] = BLANK() ))

 

Out of that I try to calculate % of SLA and % of not in SLA

 

%ofSLA = [#inSLA] / [#ofTickets] (tried also CALCULATE(COUNT('data'[SLA]), ALL('data'[SLA]))

 

%ofNoSLA = [#not_in_SLA] / [#ofTickets] (tried also CALCULATE(COUNT('data'[SLA]), ALL('data'[SLA])

 

The values looks good, however when I cross them by for instance priority, the percentages goes completly off. Any suggestions? Maybe PBI when crosses in table doesnt count the null values? but whole numbers in table looks good

EDIT: Figured out the problem

5 REPLIES 5
v-janeyg-msft
Community Support
Community Support

Hi, @Pbiuserr 

 

Has your problem solved? I saw you haven't responded.

I checked your formula, it's very simple, There should be no problem. If you don't want values to change with the context of your visuals, you should add 'all' in codes, like:  countrows(filter(all('data'),...))

 

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

Hi @v-janeyg-msft  and @amitchandak 

Sorry for late response. Yes everything was good at the very beginning it was problem from the data point of view. I figured it out some time after creating this thread that my calculations were right, just data provided has some flaws. Thank you again for your input and your willingness to help

 
 
amitchandak
Super User
Super User

@Pbiuserr , try this

countrows(allselected('data'))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi,
unfortunately it does not work as intended

@Pbiuserr ,If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.