Creating new calculated items with Oracle Data Visualization

Creating new calculated items with Oracle Data Visualization

I’m often asked ‘How do I/Can I create my own calculations in DV?’, so I thought that I’d put up a short blog on how to achieve this. I’m going to quickly create some sample data that show some simple sales figures for 99 offices. I’m then going to create 10 buckets ( or ‘bins’ ) and get DV to show who’s generating (or not) all the sales and allow me to focus on them.

Here I have a table with random distribution of sales figures across offices

pic20181.png

If I log into DV and use that data I see this

Pic20182.png

Create a project and click on the ‘Add Calculation’

Pic20183.png

This pops up an editor to allow us to define a new calculated item.

Pic20184.png

Now select Bin from the Aggregates. You can see from the description that there’s a lot of detail of what it does, how it works, etc.

Pic20185.png

This provides a template for the command, so let’s create one step by step. As we are looking to create bins of offices by their sales figures, let us start by dragging ‘SALES’ into the ‘measure’ as shown.

Pic20186.png

Now let us dimension that by office. DV is knows which are measures and which are dimensions, so just click on ‘dimension’ in the calculation field and it will pop up the list of possible dimensions ( in our case this is just OFFICE ).

Pic20187.png

Click on it and you should now see the formulae taking shape

Pic20188.png

We don’t want an additional ‘Where’ command and we do want 10 buckets, so edit as shown. Call it ‘SalesBins’ and press validate to validate it.

Pic20189.png

Now save the new calculated item. We can now freely use it in our analysis to perform bucketing.

Pic20190.png

A pivot quickly gives us the following, showing sales by office neatly arranged into the 10 buckets.

Pic20191.png

If we apply a Scatter Cat visualisation and colour it by bucket we can get a great view of everyone.

Pic20192.png

So we have shown how to create and use a sample calculated item. We chose ‘bins’ as it’s used quite a lot, but of course we could apply a clustering to achieve something ‘similar but different’. Here I have applied a K-Means cluster and have clustered the offices. I have retained the colouring of the bins so that you can see how this apportionment has taken place. That’s a topic for a future blog post.

Pic20193.png

Leave a Reply

Your email address will not be published. Required fields are marked *

two × 4 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.