February 3, 2023

whiskeygingershop

Learn new things

Comparing Month and Year Data using Beast Modes

Comparing Month and Year Data using Beast Modes




 / Evaluating Month and Yr Information working with Beast Modes in Domo
















Issue Assertion: It is important to be able to look at one particular thirty day period or calendar year to a further and assure that they are equal. This needs us to both cover the latest month from a card considering that it is not entire, or demonstrate the action in each and every month through the exact point in time. For illustration, if it is the 15th of the thirty day period, just display the to start with 15 days of exercise in each month. We didn’t want to manually adjust cards every single thirty day period or have to demonstrate why a thirty day period seems so distinct from an additional thirty day period.

Resolution Statement: I was capable to resolve this trouble by building two unique beast modes for the two distinctive scenarios. If I want to exclude the current month from a card, I create a beast mode that appears to be at the day in the dataset and checks to see if it is a lot less than or equal to the final working day of the current date’s earlier month. If it is, then I assign it a worth of “include”, if not I assign it a benefit of “exclude”. I set this beast mode in my filter and filter to involve. In this article is the beast mode:

Beast Manner for together with done months

Case WHEN `EntryDate` <= LAST_DAY(DATE_SUB(CURRENT_DATE(), interval 1 MONTH)) 

THEN ‘Include’

ELSE ‘Exclude’

END

If I want to only show activity through the same point in time each month, I utilize the DAYOFMONTH function to evaluate whether the day is less than or equal to today’s day. I then include or exclude and drag it into the filter just like my other beast mode. This allows us to see how the current month is trending compared to the same point in time as previous months. Here is the beast mode:

Beast Mode for including only up to the same point in time of each month

CASE WHEN DAYOFMONTH(`EntryDate`) <= DAYOFMONTH(CURRENT_DATE()) 

THEN ‘Include’ 

ELSE ‘Exclude’ 

END

Demo: I created a video that demonstrates how to use each function: