2 Replies Latest reply: Oct 1, 2018 3:30 AM by Øystein Kolsrud RSS

    Please find the solution for below scenario...?

    Narayana Reddy

      Hi All,

       

      Sales:                                    Product:

      ID, RefID, SalAmount           ID,   ProdAmount, Date

      1,  101,    150                        1,    400,                01/1/2018

      1,  102,    200                        1,    450,                 01/1/2018

      2,  103,   220                          2,   520,                 03/1/2018

      2,   104,   250                        2,     610,                04/1/2018

      3,  105,   300                         3,     650,                05/1/2018

      3,  106,   360                         3,      700,               06/1/2018

       

      here one of my table like

      Expression1: Sume(SalAmount)

      Expression2: Sum({<Date={'=<$(=Max(Date)) >= $(=Min(Date))'}>}ProdAmount )

       

      ID, RefID, Sum(SalAmount), Expression2, Date

      1,     101,     150,                    400,              01/1/2018

      1,    101,     150,                     450,              01/1/2018

      1,    102,    200 ,                     400,                01/1/2018

        1,   102,    200 ,                     450,                 01/1/2018

      2,   103,      220,                     520,             03/1/2018   

        2,   103,      220,                   610,                04/1/2018

      2,    104,     250                     610,             04/1/2018

      2,    104,     250 ,                   520,                 03/1/2018      

      ........!

      My Table Coming like the above here i am getting 8 records but my client want to display 4 records so what can i do between the table so that i can get the 4 records in Straight table


      Please help in this... Thanks





        • Re: Please find the solution for below scenario...?
          Tim Poismans

          Well, as your ProdAmount and Date are making it so you have 8 records, you remove those from the table.

          This would result in 4 rows of data, based on the following dimensions: ID, RefID and the measure: Sum(SalAmount).

           

          Though I don't know if this is the desired output.

           

           

          Could you tell/show what 4 records your client wants to see exactly?

          Would make it easier for us to find a solution that fits your needs.

           

           

          Regards,

           

          Tim P.

          • Re: Please find the solution for below scenario...?
            Øystein Kolsrud

            In you're table you have two rows with RefID 101, one with ProdAmount 400 and one with 450. How would you choose which of those values to display in the ProdAmount column if you only want to show one line? Perhaps you want to replace the "ProdAmount" dimension with a measure? For instance "Max(ProdAmount)"? But in you're example you seem to select "Min" for RefId 101 and "Max" for 102, so you might be looking for something else.