Best Of
Re: What is the best way to calculate?
the learning lesson is you shouldn't have nested CASE statements
AVG( case when (CASE WHEN (`instrument` = 'first home') THEN '1st Home' WHEN (`instrument` = 'fannie mae risk share') THEN 'NoMi' WHEN (`instrument` = 'fha streamline') THEN 'FSR' WHEN (`instrument` = 'first home tax exempt') THEN '1st Home' WHEN (`instrument` = 'freddie mac advantage ') THEN 'HFA Advantage' WHEN (`instrument` = 'freddie mac risk share') THEN 'NoMi' WHEN (`instrument` = 'freddie mac advantage') THEN 'HFA Advantage' WHEN (`instrument` = 'fsr') THEN 'FSR' WHEN (`instrument` = 'home again') THEN 'Home Again' WHEN (`instrument` = 'NoMI') THEN 'NoMi' WHEN (`instrument` = 'score') THEN 'Score' ELSE `instrument` END) = '1st Home' then `spread` end)
because if you boil it down.
your inner CASE statement will return a number.
so then in your outer CASE statement you have
CASE when <number> = '1st Home' then spread end.
well... it'll never = '1st Home'. so you always return NULL because you don't have an ELSE clause in place.
Re: Filling blank cells with 0
@akki given the nature of pivot tables, you will see a row for outcomes 5 and 4 since they exist for the month of september, but to your point there is no data there.
even if you wrote
coalesce( sum(`value`), 0 )
you wouldn't see a value in August because there literally is no data there.
in order to show a value in August, you need a row in your dataset that includes outcome5 and August. once the data is there, coalesce... will work.
Re: Magic ETL | Remove Duplicates Tile | Select all fields option
@Godiepi that's a pretty obscure use case that you'd expect full-on row duplication.
you could use MD5() hashing to concatenate all the values together and then use a RowNumber + rank_window tile then filter where rownumber = 1
this is a classic way of handling identifying slowly changing dimension rows.
Re: Population calculations in beast mode?
@ST_-Superman-_ and @datamatt , typically for anything like headcount data, you'd want data the granularity of one row per client_id per facility per day.
if you don't, imagine i have a customer who was admitted last month and stays for 3 months. in my report, i would only show them on the first day they were admitted.
you are correct it would lead to row growth to have one row per user per day, but it is definitely necessary.
to prevent the "not showing all rows" warning you need to make sure you have a metric / aggregate function. I usually add something like sum(1) as to give me rowcount, or you could add a binary column to the dataset.
Re: Freezing card at end of Fiscal Year
consider adding a "is_closed_period" column. that way you can filter on transactions that are part of the closed period and functionally "freeze" the data.
alternatively, if you label transactions as belonging to the nth period (1,2,3,4th etc.) you could filter on "all activity from the 3 closed period or earlier"
Re: Formula for rounding time to nearest minute
my approach would be to try to take a timestamp and date_format( hh:mm) that would always round down.
to address round up, i'd use a CASE statement so if second() is 30 then hh:mm + 1 minute.
Re: Trigonometric Functions in Beastmode
at the domo user conference @MichelleH showed how she used redshift + geometry functions to get that done.
https://docs.aws.amazon.com/redshift/latest/dg/ST_Point-function.html
try out your trig functions in beast modes, some of them aren't documented.
Re: PROPER Function in Views
@Sam_Donabedian some functions are available but not represented in the UI. Did you try it?
I would be surprised because beast modes are processed in the same engine as dataset views (AFAIK).
Re: Delete dashboard
@damen more specifically you need the grant (defined by Roles) that allows you manage pages.
it's not specifically that you have to be an "admin" you just need the appropriate grant.
"Custom Roles" is a domo feature that needs to be enabled in your instance.
