Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to do somefing like that :
if (count(Contract id =1,'1',
if (count(Contract id =2,'2',
if (count(Contract id =3,'3',
if (count(Contract id =4,'4',
if (count(Contract id =5,'5','many'))))) as Number of contracts
So i need to be able to look how many contracts client have. My way does not work. Can you help me please?
Try
LOAD KeyField,
if( count([Contract id]) > 5, 'many', count([Countract id]) ) as [Number of contracts]
RESIDENT YourTable GROUP BY KeyField;
You probably need a group by clause in your load statement when aggregating.
Also take care of closing functions like count() with a closing bracket, and use correct quoting of your field names when they contain e.g. spaces.
You should make a chart (pivot table, bar chart, etc.) with Client as dimension and
If(Count(distinct [Contract id])>5, 'Many', Count(distinct [Contract id]))
as expression.
HIC
I need filter, so i can select only clients that buy 1 contract or 2 ans so on.
I need filter, so i can select only clients that buy 1 contract or 2 ans so on.
I need to select values, so i can see clients that buy only one contract and the other time i whant to see those who buy 3 contracts
Then you should create a calculated dimension (expression in a List Box) according to
Aggr(If(Count(distinct [Contract id])>5, 'Many', Count(distinct [Contract id])),Client)
HIC
for some reason the system tell me that it is invalin expression