3 Replies Latest reply on Oct 7, 2018 5:53 PM by Joe Oppelt

    To show previous 2 months data by default related to current monthand will show the month data when it is selected in Filter

    DHRITIMAN BANERJEE

      Hi Community ,

       

      1)I have been facing issue in one of my requirements.

      Capture1.PNG

      Where we have to show Month data as well as Profit and Sales along with the corresponding month.

      If the last order date month is october, it will show 2 month previous  data which is August . It will show show august data by default.

      If the user want to select any corresponding month, then it will show corresponding that month's data.

      Capture2.PNG

       

      2)I have used  parameter would be a string list with two options. Select Date =>1)Default  2)Select Month

       

      Then created a Boolean filter that always equates to true. IIF ([Select Date] = 'Default', DATETRUNC('month', [Date]) = DATETRUNC('month', DATEADD('month', -2, { MAX([Date]) })), [Date] = [Date])Drag that onto your filter shelf and Select True. Then Dragged DATE onto the Filter show and show Quick Filter. Change it to MonthYear and single select dropdown and changed it to use only Relevant Values.

       

      3)One of the bug here is  if I unselect All  and choose another month, it will show correct data. But when i return to Default, the data will not show if All is unselected. Is there a way to solve the issue as per the below screenshot.

       

      Capture3.PNG

      4)Can the same business logic be implemented  without using parameters. My Date filter will directly show August data when the last order date is October and if i use multi select value list, then August will be ticked. We can select the other month's data and it will show relevant data. Is it possible without using parameters to mark August as per the scenario I explained in filter by default or use any other approach to solve the problem as our business need this approach.

      I also prefer use reset kind of button , where it will show reset all the month selected by user and show the previous 2 months by default related to current month.

       

       

      Regards,

      Dhritiman