23/06/2024

Top Business

Trend About Business

Comparing Month and Year Data using Beast Modes

Comparing Month and Year Data using Beast Modes




 / Evaluating Thirty day period and Calendar year Information applying Beast Modes in Domo
















Problem Statement: It is essential to be ready to compare a person month or yr to a different and make sure that they are equal. This demands us to possibly cover the present thirty day period from a card considering the fact that it isn’t entire, or exhibit the activity in every single thirty day period by means of the identical issue in time. For instance, if it is the 15th of the month, just demonstrate the first 15 days of action in each and every thirty day period. We did not want to manually modify cards each and every thirty day period or have to explain why a thirty day period appears to be like so unique from an additional thirty day period.

Resolution Assertion: I was equipped to fix this dilemma by producing two distinct beast modes for the two distinct scenarios. If I want to exclude the current month from a card, I create a beast mode that appears to be at the date in the dataset and checks to see if it is significantly less than or equivalent to the last day of the present date’s prior thirty day period. If it is, then I assign it a worth of “include”, usually I assign it a worth of “exclude”. I set this beast mode in my filter and filter to contain. Below is the beast mode:

Beast Manner for which includes accomplished 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: