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
**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
 10.5K All Categories
 8 Connect
 918 Connectors
 250 Workbench
 472 Transform
 1.7K Magic ETL
 69 SQL DataFlows
 477 Datasets
 198 Visualize
 254 Beast Mode
 2.1K Charting
 11 Variables
 17 Automate
 354 APIs & Domo Developer
 89 Apps
 3 Workflows
 20 Predict
 5 Jupyter Workspaces
 15 R & Python Tiles
 247 Distribute
 63 Domo Everywhere
 243 Scheduled Reports
 21 Manage
 42 Governance & Security
 178 Product Ideas
 1.2K Ideas Exchange
 12 Community Forums
 27 Getting Started
 14 Community Member Introductions
 55 Community News
 4.5K Archive