Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
loading in two SQL tables
Table 1 - Survey - Names the surveys the customer has completed
Table 2 - Main - Main Customer Table
when I load in these two sql tables, some CustomerID wont have completed a survey, and survey name appears as null - as expected
I have working Count(if([SurveyName]=0,[SurveyName])) on a table chart. , this limits the CustomerIDs that have not completed a survey
However I want to be able to count how many CustomerID, that have a Survey Name as null in a KPI
with something like
Count(if([SurveyName]=0,[SurveyName])) CustomerID)
but it does not work
I have tried too replace the nulls so they are selectable with no joy
SET NullValue = 'No Survey'
NullAsValue "SurveyName"
please help
Hi
this don't work either
says "SurveyName" field not found
survey Name field does not appear in both tables
please help
can you post your script?
or some sample app or sample data?
Preparing examples for Upload - Reduction and Data Scrambling
Hi
I cant but here are some sample tables
SQL Table Survey:
CustomerID SurveyName
1 Customer Service
3 Customer Service
4 Customer Service
5 Customer Service
SQL Table Main
CustomerID Name Surname
1 John Smith
2 Joe Bloggs
3 Jane Williams
4 Sam Morgan
5 Liz Smith
Should Return
CustomerID Name Surname SurveyName
1 John Smith Customer Service
2 Joe Bloggs Null
3 Jane Williams Customer Service
4 Sam Morgan Customer Service
5 Liz Smith Customer Service
null count in KPI should be 1 , but no joy
please help
Check the Attached, you can now filter customers with no survey
temp:
Load * inline [
CustomerID,SurveyName
1,Customer Service
3,Customer Service
4,Customer Service
5,Customer Service
];
JOIN
Load * Inline [
CustomerID,Name,Surname
1,John Smith
2,Joe Bloggs
3,Jane Williams
4,Sam Morgan
5,Liz Smith
];
NoConcatenate
FACT:
LOAd * ,
if(isnull(SurveyName),'NA',SurveyName) as NewSurveyName Resident temp;
Drop Table temp;