May 7, 2024

Business Active

business the management

Comparing Month and Year Data using Beast Modes

1 min read
A Mega Guide To Creating Evergreen Content [Infographic]




 / Comparing Month and Year Information employing Beast Modes in Domo
















Difficulty Statement: It is crucial to be equipped to review one particular thirty day period or calendar year to an additional and ensure that they are equal. This involves us to both conceal the existing month from a card given that it isn’t total, or exhibit the exercise in each individual thirty day period as a result of the same stage in time. For example, if it is the 15th of the month, just display the initially 15 times of exercise in each and every month. We didn’t want to manually regulate playing cards every month or have to reveal why a thirty day period looks so distinctive from one more thirty day period.

Option Statement: I was capable to fix this challenge by developing two distinct beast modes for the two distinct scenarios. If I want to exclude the present month from a card, I generate a beast manner that appears at the day in the dataset and checks to see if it is a lot less than or equivalent to the final day of the present date’s former thirty day period. If it is, then I assign it a worth of “include”, otherwise I assign it a benefit of “exclude”. I place this beast mode in my filter and filter to include things like. In this article is the beast method:

Beast Method for together with done months

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













Leave a Reply

Copyright © All rights reserved. | Newsphere by AF themes.