Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
People:
LOAD * INLINE [
Name, Age
Adam, 34
Bonnie, 25
Charlie, 56
David, 34
Eddy, 34
Florence, 45
Gale, 43
Helen, 24
Isabella, 37
Jamie, 54
Kelvin, 25
];
Children:
LOAD * INLINE [
Child, Name
Lyra, Adam
Matt, Bonnie
Norman, Bonnie
Oliva, Eddy
Peter, Isabella
Qweenie, Helen
Roger, Helen
Steven, Jamie
Umar, Jamie
Victor, Jamie
Walter, Kelvin
Xavier, Kelvin
Zeldar, Kelvin
];
With the above 2 tables, I created a Pie Chart to show ratio of people with kids vs people with no kids using a Calculated Dimension:
=if(len(Child) <> 0, 'People with Kids', 'People without Kids')
and Expression:
Count(DISTINCT Name)
However, I am able to filter people with kids by selecting on the Pie chart but not able to filter people with No Kids.
Anyone can help? Or have I approached this all wrong?
Hi,
Try like below,
People:
LOAD * INLINE [
Name, Age
Adam, 34
Bonnie, 25
Charlie, 56
David, 34
Eddy, 34
Florence, 45
Gale, 43
Helen, 24
Isabella, 37
Jamie, 54
Kelvin, 25
];
left join
//Children:
LOAD * INLINE [
Child, Name
Lyra, Adam
Matt, Bonnie
Norman, Bonnie
Oliva, Eddy
Peter, Isabella
Qweenie, Helen
Roger, Helen
Steven, Jamie
Umar, Jamie
Victor, Jamie
Walter, Kelvin
Xavier, Kelvin
Zeldar, Kelvin
];
Final:
load *,if(len(Child)<0 or IsNull(Child), 'People without Kids','People with Kids') as ChildStatus Resident People;
drop table People;