Group by Value in Column
Best Answers

I don't know if I am doing it right, but using the following calculated field seems to be showing results similar to what I was expecting. I added this as a calculated field and then graphend the COUNT of this over time.
COUNT(DISTINCT `ColumnName`)
0 
Yes, that is correct. COUNT is an aggregate function, just like SUM, AVG, MAX, etc. Adding the DISTINCT modifier will ignore duplicates of any values that have already been included in the count.
Well done!
0
Answers

Hey Eric,
I'm sure we can help you work this out. Where are you hoping to do this grouping (on a card, in a dataflow, etc.)? It sounds like you're hoping to take a dataset and return some values that have been aggregated based on having the same value in a certain column. For example, if your data is like this:
idSeriesValue
1Alpha7
2Alpha4
3Alpha9
4Beta3
5Beta7
6Charlie4
7Charlie5
You'd like to be able to get an output dataset with the Value column aggregated grouped by the Series values like this:
SeriesValue
Alpha20
Beta10
Charlie9
Is that right? If so, you're in luck because there are a lot of good ways to accomplish that. If not, can you clarify so we can know what you're hoping to see?
0 
I have the same question. Suggestions on how to do this?
1 
Hi,
Can you clarify what you need and where you need to do it?
Regards,
Ricardo Granada
MajorDomo@Lusiaves
**If the post solves your problem, mark it by clicking on "Accept as Solution"
**You can say "Thank you" by clicking the thumbs up in the post that helped you.0 
I have a table combining two Google Analytics data sources, which is structured like this:
Event ActionEvent CategoryEvant LablelPageviewsHostname+Pagepath
A B C 1 test1.com+ /shop/page1
D E F 1 test1.com+ /shop/page1
G H I 1 test1.com+ /shop/page1
J K L 2 test2.com+ /shop/page2
M N O 2 test2.com+ /shop/page2
test1.com+ /shop/page1 has 1 pageview and 3 events recorded from that 1 pageview. Problem is that pageviews get repeated multiple times for each combination of Action/Category/Label and when i sum pageviews I get an incorrect sum.
Desired output:
Event ActionEvent CategoryEvant LablePageviewsHostname+Pagepath  Pageview_correct
A B C 1 test1.com+ /shop/page1 1
D E F 1 test1.com+ /shop/page1
G H I 1 test1.com+ /shop/page1
J K L 2 test2.com+ /shop/page2 2
M N O 2 test2.com+ /shop/page2
I want to group pageviews in such a way that it gives me the first value or average for each Hostname+Pagepath combination. Rest are left blank or set to 0. How do I do this?
0 
I share this issue as well. I have data that has multiple rows per "Series" as you've shown. What I want to often do is graph the count of unique things in that Series over time. I don't need to aggregate the "Value" as in your example. I just need to be able to end up with a measure that is the count of unique values in a column so that I can graph that over time. What's the best way to do that?
0 
I don't know if I am doing it right, but using the following calculated field seems to be showing results similar to what I was expecting. I added this as a calculated field and then graphend the COUNT of this over time.
COUNT(DISTINCT `ColumnName`)
0 
Yes, that is correct. COUNT is an aggregate function, just like SUM, AVG, MAX, etc. Adding the DISTINCT modifier will ignore duplicates of any values that have already been included in the count.
Well done!
0
Categories
 All Categories
 1.8K Product Ideas
 1.8K Ideas Exchange
 1.5K Connect
 1.2K Connectors
 298 Workbench
 6 Cloud Amplifier
 8 Federated
 2.9K Transform
 100 SQL DataFlows
 616 Datasets
 2.2K Magic ETL
 3.8K Visualize
 2.5K Charting
 729 Beast Mode
 54 App Studio
 40 Variables
 678 Automate
 173 Apps
 451 APIs & Domo Developer
 46 Workflows
 8 DomoAI
 34 Predict
 14 Jupyter Workspaces
 20 R & Python Tiles
 394 Distribute
 113 Domo Everywhere
 275 Scheduled Reports
 6 Software Integrations
 121 Manage
 118 Governance & Security
 Domo Community Gallery
 33 Product Releases
 10 Domo University
 5.4K Community Forums
 40 Getting Started
 30 Community Member Introductions
 108 Community Announcements
 4.8K Archive