Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Support for Treemap charts in OAC with being able to configure colors with custom calculations

Received Response
54
Views
5
Comments

Summary

Support for Treemap charts in OAC with being able to configure colors

Content

Hello,

I have a requirement to use Treemap charts to show categorial data. I show in Y-axis "Record Count" and in X-axis a category called "Month". Also, I have "Record Count" added to "Color". This shows me the chart as in the screenshot.

In the screenshot, I have chosen, Green to Red diverging colors between months. When "Record Count" is added to "Color", OAC calculates Record Count for each month and shows the percentage difference as Green to Red diverging colors. Here, the colobr calculation is done by OAC. It takes Record Count for Nov moth as 2288249 (94.3%) and Record Count for Oct month as 138197 (5.7%) and shows the divergence in color.
My requirement is to replace "Record Count" with a custom calculation. My calculation would be "Record count for Nov month" minus "Record count for Oct month" divided by "Record count for Nov". How would I fetch the "Record count for Nov moth" in OAC?, ie, based on what is shown in the chart, "I want record count of that particular month" to be returned. Would I be able to fetch this in OAC?

Thanks in advance,

Chethana

Screenshot 2019-12-01 at 8.21.34 AM.png

Answers

  • User_IYLB4
    User_IYLB4 Rank 3 - Community Apprentice

    Hi,

    So are you looking to make colors on the chart dynamic or is there something else you want to do that i am missing/not getting.

     

     

  • Chethana Kumari-Oracle
    Chethana Kumari-Oracle Rank 6 - Analytics Lead

    Hi,

    Yes, I want to make colors in the chart dynamic. Currently, the colors are based on "Record Count" size. For ex, if "Record Count" for Nov month is 97 and "Record Count"

    for Oct is 3, then the color difference is as shown above. I do not want this.

     

    I want colors to be based on "Variance in record count" w.r.t previous month or previous week or previous day, depending on "what is currently shown on the chart". 

    For ex, if Months vs " Record Count" are shown in the chart above, then the Color Variance for the month of Nov is calculated as (97-3)/3=31.3%. Similarly, color variance

    for month of Oct is calculated as (3-0)/0 = 0 (No color) i.e., ["Record Count for current month" minus "Record Count for previous month" divided by "Record Count for

    previous month"]

    Thus, In order to calculate the color, I want the "Record Count" value for the current selection in the chart. If "Record Count" versus "Month" is shown in chart,

    how do I fetch the record count for each of the months,in order to calculate color variance and show it as diminishing colors from green to red (ie month having larger color

    variance (as per calculation) is green in color, month with lesser value is less greener, month with least value in red). This would show growth and de-growth of record count for

    each month w.r.t previous month in terms of color.

    How do I create a custom calculation for this

    requirement in OAC? Is it possible? Please help!

    Thanks in advance,

    Chethana

     

     

  • Chethana Kumari-Oracle
    Chethana Kumari-Oracle Rank 6 - Analytics Lead

    To explain above requirement in terms of a picture, please find the attachment. This picture has used a Microsoft opensource tool to show the sales of each bike model as the box size and the sales of each model w.r.t its previous year as a Color variance (sales growth/de-growth percentage).

    I want similar thing to be achieved in OAC, for my requirement.

    Screenshot 2019-12-06 at 7.54.26 PM.png

  • User_IYLB4
    User_IYLB4 Rank 3 - Community Apprentice

    Hello Chethana,

     

    Thanks for elaborating on the requirement, so in OAC it is possible with similar values(measures) .

    1. Using prepare tab of OAC, we can separate the required value from a column using extract or String functions available.

    2. Once we get the value separated i.e. record count value, then we can create a caluculation in OAC based on the requirement.

    3. Now place this new caluculated column in both "color" & "values" field of the visualization.

    In the below attachment a caluculation is created & a treemap is used for visualization.

     

     

    Capture.PNG

  • Chethana Kumari-Oracle
    Chethana Kumari-Oracle Rank 6 - Analytics Lead

    Thank you so much.