2 Replies Latest reply: Jun 14, 2016 8:42 AM by Stefan Wühl RSS

    Set analysis straight table

    Jaya Budihal

      Hello All,


      I have a straight table in a sheet where i need the staright table to show data from a different calendar.

      i want the straight table to show data from orderMonth and orderYear.

      The other components of sheet are sorting from Month and Year field.i tried the below set analysis but it doesnt work.

      count({<orderMonth = {"$(=GetFieldSelections(Month))"},orderYear= {"$(=GetFieldSelections(Year))"}, Month=>}order_id)


      I have two calendars in my application.


      Please help.


      Thanks & Regards,


        • Re: Set analysis straight table
          Sunny Talwar

          May be try this:


          Count({<orderMonth = P(Month), orderYear = P(Year), Month=>}order_id)

          • Re: Set analysis straight table
            Stefan Wühl

            How are your fields related in your model? And how many field values are you selecting in Month and Year at max?


            If you say, it doesn't work, can you please detail what you get and what you expect to get instead?


            Using your original approach, this might work better for multiple value selections:


            =count({<orderMonth = {$(=GetFieldSelections(Month))},orderYear= {$(=GetFieldSelections(Year))}, Month=>}order_id)

            [removed the double quotes. You want to element list like {2013,2015}  for Year modifier, not {"2013,2015"} ]

            Sunny's suggestion might also work if you are fine with copying also possible values.

            If you want to use an analogon to GetFieldSelections(), though, and not retrieve the all possible values, use

            =count({<orderMonth = Month,orderYear= Year, Month=>}order_id)

            [BTW: Do you need to clear the selections in Year field, too?]

            =count({<orderMonth = Month,orderYear= Year, Month=, Year= >}order_id)


            All approaches assume that the fields Month and orderMonth (same for the year fields) show matching values.