Categories
- All Categories
- Oracle Analytics Learning Hub
- 30 Oracle Analytics Sharing Center
- 18 Oracle Analytics Lounge
- 238 Oracle Analytics News
- 45 Oracle Analytics Videos
- 16K Oracle Analytics Forums
- 6.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 88 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
How do I create level based metrics in Data Visualization?
Summary
How do I create level based metrics in Data Visualization?
Content
Hi,
I have a dataset as below:
| Location | Revenue |
| Shop1 | 10000.0 |
| Shop2 | 2093443.9 |
| Shop3 | 10000.0 |
| Shop4 | 102345.0 |
| Shop5 | 63086.0 |
| Shop6 | 6178373.8 |
| Shop7 | 6002296.0 |
| Shop8 | 1600.0 |
| Shop9 | 2050.0 |
| Shop10 | 70701.0 |
| Shop11 | 17020.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:

And the output is as below:

But what I need is this:

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