Best Of
Re: Create A Beastmode filter that Shows Prior Year Sales in January, then switches to YTD starting Feb
Hi @Stephanie_Price I think this is what you're looking for:
CASE
WHEN
MONTH(CURRENT_DATE()) = 1 AND YEAR(`Date`) = YEAR(CURRENT_DATE()) - 1
THEN 'Include'
WHEN
MONTH(CURRENT_DATE()) > 1 AND `Date` >= DATE_FORMAT(CURRENT_DATE() ,'%Y-01-01')
THEN 'Include'
ELSE 'Exclude'
END
- First WHEN Clause (For January):
- Checks if the current month is January (
MONTH(CURRENT_DATE()) = 1). - Includes dates from the previous year (
YEAR(Date) = YEAR(CURRENT_DATE()) - 1).
- Checks if the current month is January (
- Second WHEN Clause (For February and onwards):
- Checks if the current month is after January (
MONTH(CURRENT_DATE()) > 1). - Includes dates from the start of the current year up to the current date (
Date >= DATE_FORMAT(CURRENT_DATE() ,'%Y-01-01')).
- Checks if the current month is after January (
- ELSE Clause:
- Excludes all other dates.
This logic will show data from the previous year in January and YTD data from the current year starting in February.
Re: How to find out shared datasets
Hi @Ashleigh, I have obtained the dataset for this. By joining various datasets such as Domostats, Domo governance and people. I extracted the required user information.
Thanks for your help.
Re: Beast Mode
First your Denominator is not really the same as your Beta formula, the main difference is that in the Beta formula, when LOCID is N you are not doing any sort of aggregation, but you do this on the others. First I'd update the Beta formula to match exactly what you have in the denominator, applying the SUM outside the CASE statement so it'll always be an aggregation function and see if this changes the value that you see there, the other difference in it is that you're also using a case for when the value is S in the denominator that is not in your Beta formula. Try this and see if the numbers are still not closing.
Also make sure you're not rounding the numbers of decimals displayed in the table. Since if you've selected Beta to show no decimals, then the 8 you see in the table, might actually be something around 7.57, which does yield a result of 926. If you need to work with rounded numbers you'll need to add the ROUND function to your Mas beast mode.
