Best Of
Re: Global date range filter in dashboard, have it compare to exactly a year ago in guage card type.
@GrantSmith Okay I've seen this answer from you before when I was just starting DOMO but now that I know more I gave it a try, and this is amazing! I work a lot with date comparisons and there is a lot you can do with this, Thanks Grant. Super easy to follow along with your steps and now I am able to use Period Type beast modes to get what I am looking for.
Re: How to mix and match Data
First, we should solve problem #2. Then, we'll create a canonical lookup table from Number to City to solve problem #1.
Use an Add Formula tile to make two new columns, Canonical Number and Canonical City like so:Canonical Number formula: NULLIF(STR_DIGITS(CASE WHEN City BETWEEN '0' AND '999999' THEN City ELSE Number END), '')Canonical City formula: NULLIF(STR_REMOVE_DIGITS(CASE WHEN Number BETWEEN 'A' AND 'zzzzzz' THEN Number ELSE City END), '')
Now use a Group By tile to make the lookup table. Our one grouping column will be Canonical Number, and our one aggregate will be the First non-null value of Canonical City; we'll call this the Lookup City.
Now use the Join Data tile to Inner Join the original table (the output of the Add Formula) to the lookup table (the output of the Group By) on the Canonical Number column.
The Canonical Number column and the Lookup City column in the result of the Join Data tile have the final values you want.
The whole transform has this shape:
rco
Re: How do you perform a calculation within a pivot table?
You can do a conditional beast mode to calculate your revenue or cost calculations and not use the type as a grouping
Revenue
CASE WHEN `Description` = 'Revenue' THEN `Actuals` ELSE 0 END
Cost
CASE WHEN `Description` <> 'Revenue' THEN `Actuals` ELSE 0 END
Profit
CASE WHEN `Description` = 'Revenue' THEN `Actuals` ELSE 0 END - CASE WHEN `Description` <> 'Revenue' THEN `Actuals` ELSE 0 END
Re: Global date range filter in dashboard, have it compare to exactly a year ago in guage card type.
Hey @jakebutterfield
I recommend restructuring your data model so you can have multiple periods for each date (in your case this year and last year). I've done a write up on this in the past which might be helpful for you.
This way they can select whatever date range they want and see the selected. value and the value from last year.
Re: WEEKOFYEAR() should be removed from the approved function list or it's behavior should be changed
Thanks for bringing this up Zac. We've updated the in-place Magic ETL documentation for the WEEKOFYEAR() function. The new docs will mention the discrepency with MySQL and recommend that WEEK() always be used over WEEKOFYEAR() in the current version of Magic ETL. We can't immediately change the existing behavior of WEEKOFYEAR(), of course, but we're looking into ways we might do it eventually. We don't try to guarantee perfect behavioral parity with MySQL, but we do try to avoid gotchas like this one.
rco




