Forum Discussion

BryceBicknell's avatar
BryceBicknell
Frequent Visitor
4 years ago
Solved

Min & Max Value within a date range

Hi all,

 

I am trying to work out a Min and a Max however what I would like to do is use these measures for an axis in a line chart.

 

As an example I have a =SUM(SALES) and what I would like to do is find the Minimum Value of that SUM within the past 365 days and another measure for the Max value within those 365 days.

6 Replies

  • Hi BryceBicknell ,

     

    How do you intend to use the min and max values in a line chart - as a dimension or a fact? And what is your basis for calculating what dates are within 365 days? Can you please share  sample data and your expected result.

    • BryceBicknell's avatar
      BryceBicknell
      Frequent Visitor

      What I want to do is use it for the Axis min and max range, yes I do have a date table.

       

      Below is an example of the data what my Min value should be is 2 and max should be 18 within those dates below, the main difference is my data set has hundreds of stores. So smallest sum of all stores for the min and the largest sum of all stores for the max.

       

       

      Store NumberStore NameStore Open DateAreaRegionStateTotalDateSales
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Wednesday, 2 August 20171
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Thursday, 3 August 20172
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Friday, 4 August 20173
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Saturday, 5 August 20174
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Sunday, 6 August 20175
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Monday, 7 August 20176
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Tuesday, 8 August 20177
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Wednesday, 9 August 20178
      1234ABCFriday, 29 April 2022XXXXXXXXXXXX-159Thursday, 10 August 20179
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Wednesday, 2 August 20171
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Thursday, 3 August 20172
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Friday, 4 August 20173
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Saturday, 5 August 20174
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Sunday, 6 August 20175
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Monday, 7 August 20176
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Tuesday, 8 August 20177
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Wednesday, 9 August 20178
      12345ABCDFriday, 29 April 2022XXXXXXXXXXXX-159Thursday, 10 August 20179
  • BryceBicknell's avatar
    BryceBicknell
    Frequent Visitor

    Yes I do have a calendar table I also have dates in the tables I am pulling from but the below is linked