Categories
- All Categories
- Oracle Analytics Learning Hub
- 31 Oracle Analytics Sharing Center
- 22 Oracle Analytics Lounge
- 254 Oracle Analytics News
- 45 Oracle Analytics Videos
- 16.1K Oracle Analytics Forums
- 6.3K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 94 Oracle Analytics Trainings
- 16 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
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?
User_JA6EI
Rank 1 - Community Starter
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.
0