1 Reply Latest reply on Oct 10, 2018 9:07 AM by Joe Oppelt

    Adding a reference line

    Alyssa Ashton


      I have a visual that filters on top N% of doctors by either total charges or total patients (I have a parameter and the user can choose which to view), by practice.  I would like to add a reference line to show the average for that practice (not just the top N% but for everybody) and a second reference line to show the average for all practices.  How can I do this?

        • 1. Re: Adding a reference line
          Joe Oppelt

          Because you have a top-N filter, that's a table calc, which means that ALL the rows are still in the underlying table.  (And that's good for you.)  So a WINDOW_AVG of the SUM([whatever]) will give you an average of everything.  (That's one calc.  Make that a reference line.)  And a WINDOW_AVG of :


          IF ATTR([Practice]) = (the target practice) THEN SUM([whatever]) END


          will get you the average for the practice.


          If you need help doing this, you'll have to upload a sample workbook.