Page 1 of 1

Simple calculation question

Posted: Thu Dec 05, 2019 10:14 am
by scoroop
Hi Stimulsoft Team,
I have a problem doing some simple calculations and showing them in Dashboard.
Imagine my datasource is returning 5 records. They have field "DelayMinutes" which shows how much something was delayed.

I'd like to calculate and show percentage of delayed items where delayed means "DelayMinutes>15". Therefore I need to make a calculation like (LINQ to keep it simple):

Items.Where(x=>x.DelayMinutes>15).Count()/Items.Count()

How do I do that in dashboard indicator?

Re: Simple calculation question

Posted: Fri Dec 06, 2019 9:21 am
by scoroop
Is it too much I'm asking for? :)

Re: Simple calculation question

Posted: Mon Dec 09, 2019 9:56 am
by Lech Kulikowski
Hello,

You can use the following expression:
CountIf(x.DelayMinutes, x.DelayMinutes > 15) / Count(x.DelayMinutes) * 100

Thank you.

Re: Simple calculation question

Posted: Sat Dec 14, 2019 7:42 am
by Strelok_401
Great, it does work flawlessly, thanks!

Re: Simple calculation question

Posted: Mon Dec 16, 2019 3:47 am
by Andrew
You are welcome!