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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive