how can i create a calculated field based off buckets?
Hi all,
Recently I created pricing buckets for the amount of loan a borrower took out. This works
Right now, we have two different visuals that show 2021 vs 2022
This is ok but we would rather be able to see both of these graphs in one with the different years in different colors. Is there any way to do this?
The only way I know how to set up a period over period visualization is with the year on the x axis - which in this case doesn't work.
If this helps, feel free to agree, accept or awesome it!
Best Answer
-
Wrap your beast mode in a case statement to check for this year and then another to check for last year
This Year Count:
CASE WHEN YEAR(`Fiscal Date`) = YEAR(CURDATE()) THEN COUNT(`Field`) END
Last Year Count:
CASE WHEN YEAR(`Fiscal Date`) = YEAR(CURDATE())-1 THEN COUNT(`Field`) END
You can then put both of these beast modes as your y value / series values and make sure you select a group type bar chart.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Answers
-
Wrap your beast mode in a case statement to check for this year and then another to check for last year
This Year Count:
CASE WHEN YEAR(`Fiscal Date`) = YEAR(CURDATE()) THEN COUNT(`Field`) END
Last Year Count:
CASE WHEN YEAR(`Fiscal Date`) = YEAR(CURDATE())-1 THEN COUNT(`Field`) END
You can then put both of these beast modes as your y value / series values and make sure you select a group type bar chart.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
The 'graph by' setting is set to graph by year. Not sure why the output is like that.
If this helps, feel free to agree, accept or awesome it!
0 -
I don't think you want 'graph by' since it's not really a time series. You're using the year as a categorical variable and applying it as the series value. I would get rid of the 'graph by', and then double check your sorts
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
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.8K Visualize
- 2.5K Charting
- 737 Beast Mode
- 55 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 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