0 Replies Latest reply: Oct 16, 2018 11:03 AM by Gabriel Rodrigues RSS

    How to distinguish the months when I'm using a filter that don't respect it as a dimension?

    Gabriel Rodrigues

      I'm trying to count how many clients bought our itens given the month.

      Code goes as:


      Measure is:Count({$<CLIENTE_COD={"=Sum([Receita Bruta])>0"},TIPO={"Realizado"}>} Distinct CLIENTE_COD)

      Dimensions are Month and Year


      CLIENTE_COD = clients codes (distinct numbers)

      Sum([Receita Bruta])>0 = Takes into consideration those clients that have some kind of revenue, it's because our database registers some codes in a given month even it doesnt bought from us at all (accountability shenanigans) but we cannot take those into consideration.

      Ok fine, the code works but only if I select 1 month, as long I select more than 1 month the condition (Sum([Receita Bruta])>0 ) kind of tresspass the month dimension and count codes that are Sum([Receita Bruta])=0 in a month but Sum([Receita Bruta])>0  in other month.

      If the code bought from us any time in the period but are registered as zero in certain month it gets into the count of that month...

      My guess is that we can change this

      Count({$<CLIENTE_COD={"=Sum([Receita Bruta])>0"},TIPO={"Realizado"}>} Distinct CLIENTE_COD)

      Into something that involves the month within the code but I dont know yet how to write.


      Thanks for your support!