3 Replies Latest reply: Mar 4, 2016 2:43 PM by Luiz DePaula RSS

    Multiple selections same value

    Luiz DePaula

      Hi experts,

       

      I am having trouble in finding the right function to keep the selection in a chart. I have a chart displaying Fill Rate for years 2013, 2014, 2015, 2016, and the GOAL. The users want to see only the Goal and 2016 as default. But if they select 2013, 2014 and so on, the line for that year will appear in the chart. I am using the function below and I tried several different combinations, but nothing worked. When one year is selected, that year appears, but as soon as I select another year, it disappears.

       

      The function I am using is :

       

      If(not isnull(GetFieldSelections([Year])),if(Match(Year,'2013'),Sum({$<Year={'2013'}>}[Delivery quantity_LFIMG.LIPS]) /

      Sum({$<Year={'2013'}>}[Cumulative Order Qty_KWMENG.VBAP])))

       

      Find attached a picture of the chart of what I have now.

       

      Any ideas?

       

      Thank you in advance.

       

      LD

        • Re: Multiple selections same value
          jagan mohan rao appala

          Hi,

           

          Try like this

           

          If(GetSelectedCount(Year) = 0,

          Sum({$<Year={$(=Max(Year))}>}[Delivery quantity_LFIMG.LIPS]) /

          Sum({$<Year={$(=Max(Year))}>}[Cumulative Order Qty_KWMENG.VBAP]),

          Sum([Delivery quantity_LFIMG.LIPS]) /

          Sum([Cumulative Order Qty_KWMENG.VBAP])

          )

           

          Hope this helps you.

           

          Regards,

          Jagan.

          • Re: Multiple selections same value
            balraj ahlawat

            Your Syntax look okay, why you are using set analysis again if you have used in IF condition


            may be like this?



            If(not isnull(GetFieldSelections([Year])),

            if(Match(Year,'2013'),(Sum([Delivery quantity_LFIMG.LIPS]) /Sum([Cumulative Order Qty_KWMENG.VBAP]))))

              • Re: Multiple selections same value
                Luiz DePaula

                Both of these ideas are good ideas, but only work partially. The syntax from Jagan, it displays the max year selected. I need to be able to select 2013 and still show 2014 and/or 2015 in another line. This syntax gives me only max year.

                 

                The syntax from Balraj, is similar to what I have, and I can show 2013 when selected, but when I make another selection, for example 2013 and 2014, 2013 disappear.

                 

                I need to have different lines for each year, with capability of checking them in or out, as in a check box.