2 Replies Latest reply: Jun 8, 2017 11:44 AM by Todd Buss RSS

    Can I limit a dimension to a subset within a chart?

    Todd Buss

      I'm trying to create a basic line chart that limits the x axis field to the minimum and maximum values (ignoring all the intermediate values).

       

      For lack of experience, I tried to put the "set" below in the dimension field.  I suspect I'll have to create a new dimension consisting of the two values I need, but I was hoping there's a mechanism to use a formula within the line chart instead.

       

      {min(ReportDate),max(ReportDate)}

       

      Thanks to all for considering this.

        • Re: Can I limit a dimension to a subset within a chart?
          Aar Kay

          May be something like this

          sum({<[ReportDate]={'$(=Max([ReportDate]))','$(=Min([ReportDate]))'}>}TotalSales)

            • Re: Can I limit a dimension to a subset within a chart?
              Todd Buss

              Thanks for responding.  I was trying to limit a dimension, but should've been limiting a measure.  I added your extra snippet of code to my existing measure and It worked. 

               

              This is my original measure:

              (Count({$<[Bed Status]={"FILLED"}>*<[Inpatient Bed]={"Inpatient"}>*<[Room Capacity]={2,4}> *<[Facility Code]-={"368"}>}[Bed Status])/Count({$<[Inpatient Bed]={"Inpatient"}>*<[Room Capacity]={2,4}> *<[Facility Code]-={"368"}>}[Bed Status]))

               

              This is my modified measure:

              (Count({$      <[ReportDate]={'$(=Max([ReportDate]))','$(=Min([ReportDate]))'}>*                     <[Bed Status]={"FILLED"}>*<[Inpatient Bed]={"Inpatient"}>*<[Room Capacity]={2,4}> *<[Facility Code]-={"368"}>}[Bed Status])

              /Count({$     <[ReportDate]={'$(=Max([ReportDate]))','$(=Min([ReportDate]))'}> *                     <[Inpatient Bed]={"Inpatient"}>*<[Room Capacity]={2,4}> *<[Facility Code]-={"368"}>}[Bed Status]))