-
Re: Getting a Sum of Values for X Days When There are Gaps in the Dates
@GrantSmith , but @MarkSnodgrass solution is cleaner. while buiding the universe of SKUs and Dates is an option, all that facilitates is building an (expensive) window function. a date dimension with…2 -
Re: Multiple conditions using case statements but not getting correct results
@MarkSnodgrass given the vertical ticks, 'Marketing' , would be interpreted as the text, Marketing, even if there was a column called `Marketing`-- note the tildas, `, .1 -
Re: How to aggregate CASE Statement values?
don't use SUM(Distinct) that's too risky. Imagine if the forecast value for a set of employees is all 50. SUM distinct would assume there was only one employee with a forecast value of 50. The better…2 -
Re: Ignore filters + include ALL entires of a specific measure in a formula, but filter other measures
@pl_Luke it's unclear to me how you're defining the numerator and denominator. it sounds like you want to be able to choose the reasons included in the numerator and then always have it divide by an …1 -
Re: Beastmode | Exclude data based on dates
Clean up your SQL and avoid using nested CASE statements. you want your code to read cleanly. case when `Date` > '2021-07-01' AND `company` like '%company1%' AND `ConversionTypeName` like '%produ…2