Oracle Analytics Cloud and Server

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

How do I create level based metrics in Data Visualization?

Question
21
Views
0
Comments

Summary

How do I create level based metrics in Data Visualization?

Content

Hi,

I have a dataset as below:

  

LocationRevenue
Shop110000.0
Shop22093443.9
Shop310000.0
Shop4102345.0
Shop563086.0
Shop66178373.8
Shop76002296.0
Shop81600.0
Shop92050.0
Shop1070701.0
Shop1117020.6

I need to show the location that have less than 10% of total revenue as 'Misc'

So, the metric definition would be,

Location_Name_New =  CASE WHEN Sum(Revenue By Location) / Sum(Revenue) < 0.1 THEN 'Misc' Else Location End

How do I calculate this in DV? The moment I remove the Location field from the visual, all the Location_Name_new become Misc.

This is the calculation:

image

And the output is as below:

image

But what I need is this:

image

But the moment I remove Location from report, it goes back to showing all locations Under Misc.