how can I exclude one min and one max in a dataset
basically, its a survey dataset that have a score of 1 to 10..
every quarter, we need to exclude 1 lowest and 1 highest.
currently we are doing the manual exclusion of the lowest and highest, we're wondering if we can do it in beastmode
Comments
-
I don't think you'd be able to do that in beastmode unless I'm not understanding something. You'd have to do it in ETL.
Say MySQL, If the surveys come over with some ID you could do something like this...check my syntax and logic...but theory should be good. My thought here is you may have multiple surveys with the same lowest and highest value.
transform 1 - determine the value
select min(score) as `min score`, max(score) as `max score` from surveylist
transform 2 - find low
select top 1 `survey ID`
from surveylist as l, transform1 t
where l.score = t.minscore
transform 3 - find high
select top 1 `survey ID`
from surveylist as l, transform1 t
where l.score = t.highscore
select * from surveylist
where `survey ID` not in (select `survey ID` from transform2) -keeps 1 survey that had the lowest out
and `survey ID` not in (select `survey ID` from transform3)-keeps 1 survey that had the highest out
Thanks
Matt
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 303 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 104 SQL DataFlows
- 640 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 769 Beast Mode
- 72 App Studio
- 43 Variables
- 718 Automate
- 185 Apps
- 462 APIs & Domo Developer
- 57 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 402 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 135 Manage
- 132 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive