7 Replies Latest reply: Dec 9, 2010 8:53 AM by Gregorio Zerpa RSS

    analisis set expresion its only works when i filter by dimension

      This expresion only works when i filter by dimension like [Cuenta Contable] or [Codigo del area de actividad]

      sum({$ <[Tipo de informe] = {5},[Cuenta contable de presupuesto] = {0}, [Año] = {$(=Año)}, [Código del area de actividad] = {$(=[Filtro area de actividad])}>}

      [Importe a credito de la transacción] + [Importe a debito de la transacción])

       

      The fields [Tipo de informe], [Cuenta contable de presupuesto], [Filtro area de actividad] are in Agrupacion de cuentas table.

       

      The field [Año] is in Master Calendar table.

       

      The fields [Código del area de actividad],[Importe a credito de la transacción],[Importe a debito de la transacción] are in Transacciones cliente table.

       

      This expression is in pivot table who has the dimensions [Nivel 1],[Nivel 2],[Nivel 3],[Nivel 4],[Cuenta contable].

      i dont knon why???????.

      thanks a lot.

        • analisis set expresion its only works when i filter by dimension

          I'll be honest I really don't really understand the example, but just based on the question you might need to use aggr. I know in some things that I've done, say if there are two invoice payments made on the same date that go towards different invoices, it isn't going to work unless I either show more dimensions or use aggr. Again, I'm really not sure what your example is saying, so I'm not sure.

          • analisis set expresion its only works when i filter by dimension
            Miguel Angel Baeyens de Arce

            Correct me if I'm wrong, but it seems you are using another field to filter, which is [Filtro area de Actividad], which value will be passed on the set analysis to the [Código del area de actividad].

            So your expression will only work when [Filtro area de actividad] has one value, and my guess is that that happens when you select any of [Cuenta Contable] or, of course, [Código del area de actividad]. (¿In the first case, because an explicit selection in [Cuenta Contable] will mean an implicit selection of [Código del area de actividad]?)

            If that's true, then give a try to the following:

             

            sum({$ < [Tipo de informe] = {5}, [Cuenta contable de presupuesto] = {0}, [Año] = {$(=Año)}, [Código del area de actividad] = P([Filtro area de actividad]) >}[Importe a credito de la transacción] + [Importe a debito de la transacción])


            The P() function will return all possible values for the selection (if any) done in the field used as a parameter. So if no field is filtered, it will take all possible values in [Filtro area de actividad] and will apply them to [Código del area de actividad].

            Hope this helps