10 Replies Latest reply: May 18, 2017 11:55 AM by Justin Taylor RSS

    Help with GetSelectedCount for graph time periods

    Justin Taylor

      I have a line graph that displays counts by month.

      I want it to default to a 13 month period but still allow a user to interact with the data.

      Here's my Measure:

      if(GetSelectedCount(C_Surgery_Date)>0,

      count({<ORCaseVolumeFlag={1}>} LOG_ID)

      ,count({<[_R12]={1},ORCaseVolumeFlag={1}>} LOG_ID))//rolling 13 months

       

      here's my Dimension:  monthname(C_Surgery_Date)

       

      The default view is just right.

      Clicking on one of the datapoints within the graph (the 13 month range) filters just right.

      My problem happens when using a filter pane for C_Surgery_Date and selecting something outside of the 13 months.

      The graph is replaced with the text:  The selections generated no data for this chart.

       

      I turned on show zero values after clearing the selection and now it looks like everything outside that 13 month range is zero.

       

      If I just use count({<ORCaseVolumeFlag={1}>} LOG_ID)   it shows everything.

       

      How can I set this up to meet my objective?

      Using Sense 3.0

      thanks!