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.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.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive