Simple calculation question

Stimulsoft Dashboards.WEB discussion
Post Reply
scoroop
Posts: 19
Joined: Tue Jul 12, 2016 1:43 pm

Simple calculation question

Post 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?
scoroop
Posts: 19
Joined: Tue Jul 12, 2016 1:43 pm

Re: Simple calculation question

Post by scoroop »

Is it too much I'm asking for? :)
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Simple calculation question

Post by Lech Kulikowski »

Hello,

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

Thank you.
Strelok_401
Posts: 2
Joined: Sat Nov 30, 2019 6:28 pm

Re: Simple calculation question

Post by Strelok_401 »

Great, it does work flawlessly, thanks!
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: Simple calculation question

Post by Andrew »

You are welcome!
Post Reply