Date Filters - Page Level / Card Level
l have some data like below :
Date (MM/DD/YYYY) | Count |
1/1/2019 | 2 |
1/2/2019 | 2 |
1/3/2019 | 2 |
1/4/2019 | 2 |
1/5/2019 | 2 |
1/6/2019 | 2 |
1/7/2019 | 2 |
1/8/2019 | 2 |
1/9/2019 | 2 |
and so on till Nov 30th (Daily Data)
Card level : I have used all time data and trying to get the sum of count according to the page filter (filter card).
If the page filters is from Apr 10th - Sept 10th
I want to get the data from the month of August (last full month), July ( Last full month -1)
Some more cases: Page Filters: Dec 1st - Jan 13th - Need values of Dec and Nov
How to write a beast mode code to get the data according to the page level filter( another filter card )
(CASE WHEN MAX(MONTH(`Date 1`)) = 1 THEN (CASE WHEN MONTH(`Date 1`) = 12 AND YEAR(`Date 1`) = MAX(YEAR(`Date 1`)) -1 THEN 'Yes' ELSE 'No' END) ELSE (CASE WHEN YEAR(`Date 1`) = MAX(YEAR(`Date 1`)) AND MONTH(`Date 1`) = MAX(MONTH(`Date 1`)) -1 THEN 'DblYes' else 'DblNo' END )END)
The logic in the italic case condition is not working. Please help me out.
Best Answer
-
Hello @AvinashK ,
A beast mode can only use data within the filtered range for calculations. This means a filter for Dec 1st through Jan 13th would exclude the November data you're looking for.
Similarly, you're not able to filter on a beast mode with an aggregate function like the Max() you’re using in your example.
Thanks!
Tanner
Domo EE
**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
-
Hello @AvinashK ,
A beast mode can only use data within the filtered range for calculations. This means a filter for Dec 1st through Jan 13th would exclude the November data you're looking for.
Similarly, you're not able to filter on a beast mode with an aggregate function like the Max() you’re using in your example.
Thanks!
Tanner
Domo EE
**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 can use a Window function in the Beast Mode as they apply OVER the rows that are filtered. Just bear in mind that the Window functions are not applicable when you have selected to show table totals or subtotals.
1 -
Have you had a chance to review the Beast Mode documentation in our Knowledge base. Have a look here:
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