Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can i produce the result table that are not the same with Master Data Table and Daily Data Table?
I created a table with the key as StudentName
i have this code but i get a null value
if(Books <> BooksNow, Books, 'none')
Hi Cherry,
MasterData:
Load StudentName, Books, Page from .....MasterData;
Lefdt Join(MasterData)
//We should join on Student Name and Book and that join should be left join as that is the Master Table
Daily:
Load StudentName, BooksNow as Books, Hours from ... DailyData;
Results:
Load resident StudentName, Books, Page MasterData where Books<>BooksNow;
If you really want to have matched records as well, then use if statement.
Load StudentName, Books, Page, if(len(StudentName)>0 and len(Books)>0, 'Match', 'No Match') as MatchStatus resident MasterDate;
drop table MasterDate;
Hi,
are you looking for the solution in the script level or in the front end ?
Pl add your app here
hello
i would join the two tables on common keys (student and book) by renaming these 2 fiels so they have the same name
and in a 2nd pass, create a field depending on the value (or the null value) of the field you want to compare.
something like that :
table:
load * from masterdata
joint(table)
load studentname,
bokksnow as books,
hours
from dailydata
result:
load *,
if(isnull(hours),1,0) as diff
.....
and then use that field in the charts
Hi Mihammed,
Yes I am looking for a solution in the script level.
Hello Cherry B
Try this it works
MasterData:
load * inline [
StudentName,Books,Page
Samantha,01English,15
Samantha,02English,98
Samantha,05Logic,55
Samantha,07Electronics,35
Ansha,01Calculus,67
Ansha,01Statistics,100
Solen,09Math,50
Solen,08Logic,126
Edna,03English,25
Edna,04CSharp,104
Edna,07Qlikview,210
];
join(MasterData)
DailyData:
load * inline [
StudentName,BooksNow,Hours
Samantha,01English,1015
Samantha,07Electronics,3052
Ansha,01Calculus,647
Solen,08Logic,1426
Edna,03English,2544
Edna,04CSharp,1004
];
Result:
load Distinct
StudentName,
Books,
BooksNow,
Page
Resident MasterData
where not Exists(BooksNow,Books);
drop Field BooksNow;
drop table MasterData;
load Distinct *
Resident Result;
PFA
Hi Cherry,
MasterData:
Load StudentName, Books, Page from .....MasterData;
Lefdt Join(MasterData)
//We should join on Student Name and Book and that join should be left join as that is the Master Table
Daily:
Load StudentName, BooksNow as Books, Hours from ... DailyData;
Results:
Load resident StudentName, Books, Page MasterData where Books<>BooksNow;
If you really want to have matched records as well, then use if statement.
Load StudentName, Books, Page, if(len(StudentName)>0 and len(Books)>0, 'Match', 'No Match') as MatchStatus resident MasterDate;
drop table MasterDate;
I would use the hash function on all the columns
and If need be use this new field as key
Thank you so much for the help. I really appreciate it.