Hi Nicole, thanks for your answer.
In your example, the code works because you only have a sale per month (that not how it´s in my model).
I attached the example with more data, and you will see that isnt working.
However, you give me a clue to solve this, I will try to create a table with the information aggregated, and count over that table instead of the fact table.
I will post the result,
example.qvw 155.0 K
With this data:
Data: LOAD * INLINE [ Year,Month,SalesMan,Client 2013,1,A,Cli-A 2013,1,A,Cli-A 2013,1,A,Cli-B 2013,1,A,Cli-B 2013,1,A,Cli-A 2013,2,A,Cli-A 2013,3,A,Cli-A 2013,4,A,Cli-A 2013,5,A,Cli-B 2013,6,A,Cli-B 2013,1,B,Cli-B 2013,2,B,Cli-A 2013,3,B,Cli-C 2013,4,B,Cli-C ];
It should be showing
SalesMan Total Visits 6 Visits 5 Vistis 4 Visits 3 Vistis 2 Visits 1 Visits A 3 1 1 B 2 1 2
With the SalesMan A, he visits
Client : Cli-A 4 times in the past 6 month (count 1) for column: 4 visits (its only count 1 visits per year / month, It doesnt matter if it has more than 1 visit in the same year / month)
Client : Cli-B 3 times in the past 6 month (count 1) for column : 3 visits
The problem is that in the aplication, is showing 1 for the column 6 visits and 1 for the column 4 visits.
It´s because it counts all the clients for the month 1
Meanwhile, I solved this, creating a table grouping by this fields, and using the syntax that is in the example, and its working