Beastmode field not aggregating in bar chart
I have a dataset containing the following data:
The Sessions field is a beastmode calculating the rank of the customers phone number. (Running total of how many transactions they have)
rank() over (partition by Location.ID
, PhoneNo
order by TransactionDate
)
I am wanting to create a horizontal bar chart with the number of sessions on the Y axis and the count of customers with that many sessions along the x axis like this (based on the data above):
But when I put the data in a horizontal bar chart, the Sessions field is not aggregating and resulting in this:
How can I get the Sessions field to aggregate in the bar chart?
I am wanting Sessions to be calculated as a beastmode so the user can select a date range and the Sessions will update based on that date range so I can't calculate the sessions in an ETL.
Best Answer
-
You could do this with a Histogram (though the labels would be slightly different than your picture). "Category Names" would be the phone numbers and "Column containing data set" could be a beastmode like COUNT(TransactionDate) or COUNT(DISTINCT TransactionDate)
To keep it as a horizontal bar chart, I would use two beastmodes:
- Y axis: COUNT(DISTINCT
TransactionDate
) - X axis: COUNT(DISTINCT
MaskedPhoneNo
) - Tooltip:
MaskedPhoneNo
Make sure the Tooltip is not aggregated. That's what is going to let your card know that you don't want to pool all of the customers into one bucket. You could also put the MaskedPhoneNo as the series, which would allow you to see which customers fall into which bucket, maybe with some hover text. Only problem is it gets pretty busy pretty quickly, depending how many customers/bar.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 - Y axis: COUNT(DISTINCT
Answers
-
Do you have any sorting going on that might be making it deaggregate?
0 -
@Sean_Tully No the unaggregated data appears when I have sorting/filtering applied and when there are none.
0 -
Sorry, was playing around with it and couldn't make it work. I suspect the analyzer doesn't like the rank function for this purpose, but I'm not sure. Interestingly, if I put the phone number on the card as a series, the bars did stack and it looked more correct, but I'm sure you don't want to see them stacked like that. I'd suggest you mark this unanswered so someone else can pick it up and hopefully solve it for you.
0 -
You could do this with a Histogram (though the labels would be slightly different than your picture). "Category Names" would be the phone numbers and "Column containing data set" could be a beastmode like COUNT(TransactionDate) or COUNT(DISTINCT TransactionDate)
To keep it as a horizontal bar chart, I would use two beastmodes:
- Y axis: COUNT(DISTINCT
TransactionDate
) - X axis: COUNT(DISTINCT
MaskedPhoneNo
) - Tooltip:
MaskedPhoneNo
Make sure the Tooltip is not aggregated. That's what is going to let your card know that you don't want to pool all of the customers into one bucket. You could also put the MaskedPhoneNo as the series, which would allow you to see which customers fall into which bucket, maybe with some hover text. Only problem is it gets pretty busy pretty quickly, depending how many customers/bar.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 - Y axis: COUNT(DISTINCT
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.8K Visualize
- 2.5K Charting
- 731 Beast Mode
- 55 App Studio
- 40 Variables
- 682 Automate
- 175 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 122 Manage
- 119 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 107 Community Announcements
- 4.8K Archive