Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am working to develop a pie chart and need to categorize or group text data and change the labels for the chart.
The data is as below
Zip Codes Needs to be displayed as
99999 On Street
77777 Shelter
66666 Shelter
all others Not Homeless
Dimension:??????
Expr: count(DISTINCT [Client ID])
Should return a pie chart with three sections: On Street, Shelter, Not Homeless
Tried this dimension, getting error:
=Aggr(If(Client.ZipCode NE=99999, 'On Street',
if(client.zipcode ne= 66666 or 77777, 'Shelter', 'Not Homeless')))
OK, well this is what i have done..
Dimension:
=If([Zip Codes]='99999', 'On Street',
if([Zip Codes]='77777' or [Zip Codes]='66666', 'Shelter',
'Not Homeless'
))
Expression:
count(DISTINCT [Client ID])
obviously you have to change the field names to match yours.
But the above works for me as you can see..
You should do this in the script and use a mapping table.
If you need to do it in the chart though you can use an IF statement in the dimension
=if([Zip Codes] = '99999','Homeless',
if([Zip Codes] = '77777', or [Zip Codes] = '66666','Shelter',
'Not Homeless'
))
try that
still getting error. Unfortunately I do not have access to add any tables. I only have access to the front end so that I can build and edit tables and charts.
Here is a sample..
Sorry, I can't open this file. I only have access to the end-user web-based interface provided by a 3rd party vendor. I cannot open qlik files.
OK, well this is what i have done..
Dimension:
=If([Zip Codes]='99999', 'On Street',
if([Zip Codes]='77777' or [Zip Codes]='66666', 'Shelter',
'Not Homeless'
))
Expression:
count(DISTINCT [Client ID])
obviously you have to change the field names to match yours.
But the above works for me as you can see..