Can you create a beastmode CASE when for values between two numbers?
I'm looking at influencers and their number of followers and want to group the data:
number of follower: 1-50000, 50000-100000, 100000-200000 and so on.
I was going to use the case when beastmode but cant find a between function to select the relevant numbers. Any help?
Best Answer
-
Here you go:
CASE WHEN `Followers` >= 0 AND `Followers` <= 9999 THEN 'Bronze'
WHEN `Followers` >= 10000 AND `Followers` <= 99999 THEN 'Silver'
WHEN `Followers` >= 100000 AND `Followers` <= 499999 THEN 'Gold'
WHEN `Followers` >= 500000 AND `Followers` <= 1000000000 THEN 'Platinum'
END0
Answers
-
You sure can. Just modify this to your own use:
CASE WHEN `followers` BETWEEN 1 AND 50000 THEN 'A'
WHEN `followers` BETWEEN 50001 AND 100000 THEN 'B
.....
ENDHopefully that's what youre looking for. If not, let me know and i'll try to help further.
Sincerely,
ValiantSpur
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.0 -
Hi! This doesnt seem to work, is there something else wrong with the beastmode calculation?
CASE WHEN `Followers` BETWEEN 0 AND 9999 THEN 'Bronze'
WHEN `Followers` BETWEEN 10000 AND 99999 THEN 'Silver'
WHEN `Followers` BETWEEN 100000 AND 499999 THEN 'Gold'
WHEN `Followers` BETWEEN 500000 AND 1000000000 THEN 'Platinum'END
0 -
What's the datatype for your `Followers` field? In the analyzer when you're doing the beastmode, what does the icon next to the field name look like? Is it a '123' like below?
0 -
yes its '123' ?
0 -
Here you go:
CASE WHEN `Followers` >= 0 AND `Followers` <= 9999 THEN 'Bronze'
WHEN `Followers` >= 10000 AND `Followers` <= 99999 THEN 'Silver'
WHEN `Followers` >= 100000 AND `Followers` <= 499999 THEN 'Gold'
WHEN `Followers` >= 500000 AND `Followers` <= 1000000000 THEN 'Platinum'
END0 -
Hi, I'm also facing the same issue. I wanted to set the range of a metrics (datatype is '123'). Usually we show this metrics in a aggregated level (Sum). But the output of the beast mode is not showing correctly. Any solution for this?
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive