You need to assign common group values to your different field values.
You can do this in a calculated dimension, but it's better to do this already in th script when you load your data into QV.
For example, you can do it like
if(FIELD like 'GW*' or FIELD like 'PP*', 'Group1'
, if(FIELD like 'A*', 'Group2','Group3')) as GROUP
Then you only need to create a pie chart object with dimension GROUP and expression
The inline table is just to load some sample data, you should replace the part starting from INLINE with
And replace FIELD with your field name and 'Group1' etc with group names that are more meaningful.
Hope this helps,
But i'm not sure i understand how to write the syntax, I wrote it in the edit script option and this is what i got :
Cannot open file 'C:\Users\orhas\Documents\Billing Options' The system cannot find the file specified.
if([Billing ID] like 'GW*' or [Billing ID] like 'PP*', 'Online'
, if(FIELD like 'A*', 'Gift','Credit')) as GROUP
From [Billing Options];
it seems like it's trying to open a new document but all my info is on a sql server.
any ideas whats wrong??
To connect to an sql server, you need a ODBC or OLEDB connection i.e. a ODBC / OLEDB CONNECT statement with an appropriate connect-string.
If you have created a data source using the Windows administration tool, it's quite easy to connect using the QlikView Wizards on data tab of the script editor.
Maybe this is somewhat helpful: