5 Replies Latest reply: Sep 28, 2016 8:24 AM by Tanya Ruppell RSS

    Set Analysis with selection not working as expected

    Tanya Ruppell

      Hello,

       

      I am trying to understand set analysis, but it doesn't seem to work as I expect when I make a selection. Here is my data:

       

      Residences:

      LOAD * INLINE [

      Residence_ID, address, type

      1, 123 Main St, Apartment

      2, 234 Bay St, House

      3, 345 Second St, Apartment

      4, 456 Oak St, House

      ];

       

      People:

      LOAD * INLINE [

      Name, gender, Residence_ID

      JOHN SMITH, M, 4

      ROBERT JOHNSON, M, 3

      MICHAEL MILLER, M, 1

      WILLIAM BROWN, M, 4

      DAVID JONES, M, 1

      RICHARD WILLIAMS, M,2

      MARY DAVIS, F, 3

      PATRICIA ANDERSON, F, 2

      LINDA WILSON, F, 4

      BARBARA MARTIN, F, 3

      ELIZABETH TAYLOR, F,1

      JENNIFER MOORE, F, 3

      ];

       

      Then I create a bar chart with dimension of gender and measure of count({$<type={'Apartment'}>} Name)

      So I only want my chart to count the number of people living in apartments.

       

      If I then select to just show item of type House, I expected my chart to be blank, because $ represents the current selection and there is nothing of type "Apartment" in that selection; however, it does not change.

       

      Can someone explain this?

       

      Thanks,

      Tanya