Comparing Month and Year Data using Beast Modes

Comparing Month and Year Data using Beast Modes




 / Comparing Thirty day period and 12 months Details working with Beast Modes in Domo
















Difficulty Statement: It is important to be equipped to evaluate one particular thirty day period or 12 months to one more and make certain that they are equal. This needs us to either cover the latest thirty day period from a card considering the fact that it is not entire, or present the exercise in every month by way of the exact level in time. For example, if it is the 15th of the month, just display the very first 15 times of action in each and every thirty day period. We did not want to manually change cards just about every thirty day period or have to demonstrate why a thirty day period looks so diverse from another month.

Resolution Assertion: I was equipped to clear up this issue by building two different beast modes for the two unique predicaments. If I want to exclude the present-day thirty day period from a card, I develop a beast method that appears to be at the date in the dataset and checks to see if it is considerably less than or equal to the past day of the present-day date’s earlier thirty day period. If it is, then I assign it a price of “include”, usually I assign it a price of “exclude”. I place this beast manner in my filter and filter to include. Below is the beast manner:

Beast Manner for such as accomplished months

Situation 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: