in this video we will use window calculations in a dashboard
they allow you to perform different analytical tasks like computing totals,
percentages, differences and so on
i'll start by adding a grid
then I'll create some columns by adding category and extended price
I'll add another extended price column and we'll use this to show percentage
click the drop-down and select calculation percent of total
you'll see now that the grid shows the percentage value. right click its column
header and select add total-- sum to display a total value for this column and
you'll see the sum equals one hundred percent. now let's look at rank
calculations
i'll add another extended price column to the grid and select calculation rank
each category is given a ranked number based on its extended price value and of
course you can sort them in ascending or descending order
all right let's get rid of the grid and add a chart item
add extended price to the value section and order date to the arguments
set it to quarter year
then add another extended price to the value section and change its series type
to Point/Line Arc
now open its drop down and go to calculation you'll see that the running
summary along series item is disabled because the chart doesn't have a series
i'll choose running summary along arguments and you'll see the diagram
displays the growing summary line
let's remove the running summary from values and look at running totals along
series now. right click on the chart and select transpose
you'll see the order date is now a series now I'll add the country field to
the argument section in the extended prices drop down i'll choose calculation
running summary along series
and you'll see the chart adjust its values to show cumulative totals
now let's look at some more advanced settings to apply calculations
let's add a pivot grid
then drop the extended price to values
country to columns and two order dates to the rows section
one will reflect year intervals and the other we'll set to quarterly
let's look at the difference between the values from their previous quarter
now let's switch to the data tab and under initial state choose expand row
groups then remove the row totals by unchecking here in the drop down
i'll add another extended price value and then choose a custom calculation for
it
in the pop up
choose difference for the calculation type
select rows to perform a calculation vertically through pivot rows. the
difference from option allows you to specify a value to subtract keep the
difference as previous and click apply now you can see the difference between
each year end and beginning as well
negative values will have brackets around them
then select rows within groups in the calculate along drop down... keep the
difference as previous and click apply
you'll see that the second columns now reflect the difference from the previous
quarters value
now I'll go back and check the percentage difference and click apply to
show the difference in percent
you can also edit the expression by clicking the button here
the expression editor allows you to adjust the calculations you want to use
i'll change the offset number in the look up from negative 1 to negative 4
with this expression we're now calculating the difference between
quarters for each previous year
so when I click apply you'll see that the value of 35.1 k is the difference
between the third quarter from 2014 to 2015
finally let's look at moving calculations. they use neighboring values
to calculate a total. i'll remove these items from the dashboard and add a new
chart
drag extended price to values and order date to arguments
let's change the series type to spline and the arguments group interval to
exact date
you'll see the chart becomes very crammed with fluctuation lines
i'm going to add another extended price value and change it to spline as well
I'll also choose a custom calculation
this time I'll select moving calculation
I'll leave the moving along options set to arguments and change the summary
function to average then i'll change the start offset and and end offset values to 15
this means that when i click apply the chart will reflect averages at each
point from the previous and next 15 values
and that's it for this video to learn more about our dashboards make sure to
check out the documentation on our website
thanks for watching and thank you for choosing DevExpress