1 Reply Latest reply: May 9, 2017 1:18 PM by Michael Marchese RSS

    Apply set analysis to an entire sheet?

    Michael Marchese

      Is this possible?  For instance, rather than having to add {<[Machine Type]={'Sorter'}>} to every single measure on my "Sorting Machines" sheet, it'd be really convenient to add it once at the sheet level, allowing me to keep my individual measures simple.

        • Re: Apply set analysis to an entire sheet?
          Michael Marchese

          I figured out a way to accomplish this via an extension.  I'd rather not resort to it though, since this extension -- like many extensions -- seems buggy and -- like all extensions -- takes up space on the sheet and doesn't work in the cloud.


          Anyway, here's how to implement it:

          1. Get the SheetEvents extension, which lets you execute actions upon switching to a certain sheet.
          2. Replace the hard-coded filters in each of your measures with a reference to a variable.  So instead of {<[Machine Type]={'Sorter'}>}, you'd just have {$(v_sheetFilter)}.
          3. Use SheetEvents to do two actions upon switching to the sheet in question:
            1. Clear selection filters as needed.  In this case, I'd clear any filters on [Machine Type].
            2. Set v_sheetFilter = "<[Machine Type]={'Sorter'}>"