Numbers are not grouping together
I am trying to make a chart using different sale data. Currently I have an issue of certain numbers not grouping together. I have attached a picture to show what I am talking about. I have tried using the SQL tool to group the data together but I cannot get that to work. I have posted my SQL code below as well. Any ideas or help would be awesome.
SELECT
(sales_amt/trans_count),
sales_amt,
.
.
.
.
begindate
FROM database
WHERE type = 'SERVICE FEES'
GROUP BY (sales_amt/trans_count) ;
Thank you
Taylor
TDaily
Best Answer
-
What I did to get it to work was kind of like Aaron suggested, I used SQL to create a new output table and rounded the calculation to the closest 2 decimals and that solved the issue.
SELECT
ROUND(sales_amt/trans_count,2) as fee,
trans_count as Transactions,
.
.
.
.
FROM Database;
Thank you
TDaily0
Answers
-
Do you have an aggregation of some kind in your SELECT statement? Like a SUM() or COUNT()?
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
No I don't have any aggregations of any kind in my SELECT statement.
Thank you
TDaily0 -
To get values to group together there would need to be an aggregation of some sort. Either on the SQL or on the table card. For example, you could sum the transaction column but not the amount column to get the number of transactions per transaction amount.
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Thnak you for your help and looking into my issue.
On the Domo side I am summing the transactions. So I have that aggregation. It is like Domo doesn't recongize that those two $5 numbers are the same. I was thinking it could possibly be slighlty different like 10 decial places. I don't know if that is what it is but I know with some computer calutaltions stuff like that can happen.
$5.00000000001
$5.00000000000
Thank you
TDaily0 -
That's very possible. To test that, create a beast mode that just looks at the first two decimals. Try a ROUND() function.
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
What I did to get it to work was kind of like Aaron suggested, I used SQL to create a new output table and rounded the calculation to the closest 2 decimals and that solved the issue.
SELECT
ROUND(sales_amt/trans_count,2) as fee,
trans_count as Transactions,
.
.
.
.
FROM Database;
Thank you
TDaily0
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