mardi 23 août 2016

Ambiguous Tableau IF Statement

I am reading Fitting a Normal Curve to a Histogram

It says

Because the INT formula rounds down towards zero, any negatives are actually rounded up along the number line (still rounded down in terms of absolute magnitude).

This creates the situation where your zero bin, which should represent 0 to +1000 or whatever your bin size parameter is set to, actually represents –1,000 to +1,000. We need to correct that and can do it by shifting the negatives down.

Change the formula to…

INT ( [Profit] / [Profit Bin Size] ) * [Profit Bin Size] + IF [Profit] [Profit Bin Size] ELSE 0 END

What does IF [Profit] [Profit Bin Size] ELSE 0 END mean? I've never seen this syntax.

I've seen If A Then B Else C End

Aucun commentaire:

Enregistrer un commentaire