x
Comments
-
what is the shape of your data? what is the granularity? (one row per judge per year? one row per judge when they were made 'active?')
if it's one row per judge, then just do count(distinct judge_id) as a beast mode, and then Active Date on the axis.
if it's one row per year, then you want to filter where year(active_date) = year( transaction_date) and then do a count distinct.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
x
0 -
my question about how the data is structured is important to the solution to this problem. what is the granularity of the dataset.
a window function would get you halfway there
sum(sum(amount) over (order by year(date)) --
IF the granularity of the dataset was one row per judge.
but if the granularity of the row is one row per judge per year, or one row per judge per activity, you cannot use a window function because you cannot count distinct across partitions the way you'd like to.
sum(count(distinct judgeID)) over (order by year(date))
would return the wrong result b/c you'd count distinct by year and then sum, which would count judges that appeared in multiple years more than once.
and you can't use any other aggregation type count(count(distinct)) or any permutation of that b/c when you've aggregated to the year level, you lose context of the individual judges and you have an aggregate number like 5, 400 or 30.
IF you want to retain the granularity of one row per judge per year, then reshape your data such that you have one row per judge per year and measurement of 1 or 0 to indicate if they were active. then you can just take a SUM across the board.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
x
0 -
i solved this myself. Thanks
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 710 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive