Can we pass 'data range' to beast mode? If yes, how?
Best Answers
-
MIN would return the first date in that range with values and Max would return the last date in the range with values. If you have data on every date, it would work like you're hoping. If you don't have data until Jan 4th, in your example, MIN(`date`) would return Jan 4th, even though they chose Jan 1st as the beginning of the date range.
Does that make sense?
0 -
@zcameron correct me if I'm wrong, but aggregate functions like MIN() will also be influenced by the chart type chosen and if there are series groupings within that chart. Each stack segment in a stacked bar chart, for example, could have a unique MIN() value or MAX() date value (transactions by division maybe). A MAX() in a pie chart might behave differently than it would in a line chart or a gauge.
So @magicdust, be aware of the underlying groupings that MIN() and MAX() might apply to and how widespread your data is across the dimensions included in the dataset.
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
Answers
-
0
-
The date range isn't available as a variable or function in the beast mode. In some cases, though, you can use a datediff to figure out how many days the range represents.
Here's an example:
SUM(`login_count`) / DATEDIFF(MAX(`date`), MIN(`date`))
Not sure if this will fit your use case, but it's something you could look at.
Let me know if that helps.
0 -
@magicdust, did zcameron's response help answer your question?
0 -
Thanks for the reply, however I want to calculate based on what user has selected in the date, not on min and max from dataset.
0 -
Just as a note, the MIN and MAX functions will return the MIN and MAX of the filtered data, not the entire dataset. That means that if the user selects This Month, the MIN would return the first day of this month with values and the MAX would return the last day of this month with values, even if the dataset covers much more time than just this month.
I can understand what you're after, though, and agree that it would be great to be able to access the selected date range in a beast mode. If it isn't there already, I think it would be a great addition to the Ideas Exchange.
1 -
Instead of selecting 'this month', if user selects date range e.g. 1- Jan 2016 till 20-Jan 2016, what would happen?
0 -
MIN would return the first date in that range with values and Max would return the last date in the range with values. If you have data on every date, it would work like you're hoping. If you don't have data until Jan 4th, in your example, MIN(`date`) would return Jan 4th, even though they chose Jan 1st as the beginning of the date range.
Does that make sense?
0 -
Makes sense! Thanks
1 -
@zcameron correct me if I'm wrong, but aggregate functions like MIN() will also be influenced by the chart type chosen and if there are series groupings within that chart. Each stack segment in a stacked bar chart, for example, could have a unique MIN() value or MAX() date value (transactions by division maybe). A MAX() in a pie chart might behave differently than it would in a line chart or a gauge.
So @magicdust, be aware of the underlying groupings that MIN() and MAX() might apply to and how widespread your data is across the dimensions included in the dataset.
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 -
You're welcome!
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
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
- 607 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 708 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