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 TSM
**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
-
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:
Dani aka "Mr.Dojo"
Dojo Admin
**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"
**You can update your Dojo Community name and avatar by clicking on your avatar then the "My Profile" button.0
Categories
- 10.8K All Categories
- 3 Private Company Board
- 1 APAC User Group
- 12 Welcome
- 38 Domo News
- 9.7K Using Domo
- 1.9K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 343 Workbench
- 259 Domo Best Practices
- 11 Domo Certification
- 464 Domo Developer
- 50 Domo Everywhere
- 105 Apps
- 714 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 26 お知らせ
- 64 Kowaza
- 299 仲間に相談
- 653 ひらめき共有