Creating stacked bar chart from columns in data set
I would like to create a stacked bar chart that shows one stacked bar each for several columns in my data set, but not all of them. The number of different values contained within the columns would be the stacks. For example, say I have the attached dataset, then I want to make a chart similar to the one depicted in the other attached file.
Ok so if you've got the dataset described and you're wanting to show 3 different column names along the X axis, then you'll need to modify your original dataset so that all 3 column names can be found within a single column of data.
Using a SQL transform you could do something like this:
SELECT `col 1` AS 'Value', 'col 1' AS 'column_name'
SELECT `col 2` AS 'Value', 'col 2' AS 'column_name'
SELECT `col 3` AS 'Value', 'col 3' AS 'column_name'
This would result in a Value column and a column_name column. With this new dataset, use column_name as your X axis. A COUNT of Value as your Y Axis and the Value column as-is for your Series.
I believe that should get you what you need.
Let me know if you have any questions,
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.0
Go to the Datacenter and on the top white strip, look for the Magic Transform section. Click on the SQL icon and select either MySQL or Redshift(i dont' think it matters). From the next page, click on the select the Input Dataset drop down and select the dataset you have created. Then click on Add Output dataset and write you're SQL in there. Don't forget to click on Additional Options and select when you want the dataflow to run.Domo Arigato!
**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'0
Thanks for replying ValiantSpur.
This is very intuitive and makes sense to me. The only thing I'm unsure about is how to use this transform in Domo. Do I input it into beastmode or where do I code this in the interface?
Thank you Godzilla! The transform worked.0
- 7.7K All Categories
- 12 Connect
- 925 Connectors
- 247 Workbench
- 441 Transform
- 1.7K Magic ETL
- 61 SQL DataFlows
- 456 Datasets
- 88 Visualize
- 222 Beast Mode
- 2.1K Charting
- 8 Variables
- 35 Cards, Dashboards, Stories
- 5 Automate
- 349 APIs & Domo Developer
- 85 Apps
- 17 Predict
- 3 Jupyter Workspaces
- 14 R & Python Tiles
- 242 Distribute
- 60 Domo Everywhere
- 241 Scheduled Reports
- 18 Manage
- 39 Governance & Security
- 46 Product Ideas
- 1.1K Ideas Exchange
- 6 Community Forums
- 19 Getting Started
- 6 Community Member Introductions
- 50 Community News
- 18 Event Recordings
- 577 日本支部