Subscribe Bookmark RSS Feed

Ignore duplicate rows in a Variability chart

Nir

New Contributor

Joined:

Nov 3, 2016

Assuming this imaginary data table:

Capture.JPG

is it possible to create a variablity chart for Student by Course, while only counting in Ted score once (1 occurence) ?

I'd like to perform it without creating a new data table or filtering it out using a data filter.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution
Since you are using a script to generate your output, either of the choices you have eliminated can actually be used. The data filter makes row state changes to your data table, and you can use "Make Row State Handler" to execute code that would delete the second data table, and then recreate it and it;s output. Your second option of not using a Data Filter for the second graph can also be used. But don't use a Data Filter, use a Local Data Filter for the second table. So your idea of having a Rank column is a good idea. The Local Data Filter would subselect on it. Your script can also collapse he Local Data Filter outline box to keep it from the users view.
Jim
4 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Are there multiple cases where Student Name has duplicate records, or is it just for Ted? And which occurrence for Ted do you want to use?

If it is only Ted that has duplicate records, then you can simply click on one of the cells in the column Student Name, that has the value Ted, and the right mouse click and select "Select Matching Cells". Go to the row that you want to use for Ted's value, press the CNTL key and then unselect that row by clicking on it. Now what is left are all of the rows you do not want in the analysis. Simple place your cursor on one of the remaining selected rows, right click and select "Hide and Exclude". Now you can run your analysis.

If there are more Student Names that have duplicate records, then a script can be written to do the actions I mention above, but for all duplicate Student Names.
Jim
Nir

New Contributor

Joined:

Nov 3, 2016

Thank you for your reply,

I guess my example wasn't good enough, so it didn't give a good idea on what I tried to achieve. I'll try to be more specific:

  • My Window has two charts, the 1st one uses columns A, B & C as elements, the 2nd one use column A, B & D as elements for the variability chart.
  • Since columns C & D are unrelated, the number of rows will be duplicated by the cross product of the unique values, like in the example above, ted's score isn't related to the car owned, so his score appears on both rows.
  • I have a data filter on my report, which enables the user to filter data from columns A & B.

So currently, the variability chart include both values as observations.

My window for the charts is created using scripts, so I initially thought about creating a New Data Table for the variability chart, that will have duplicate rows removed, but it'll have to be recreated each time the user change the selection on the data filters, so it's a no-go.

I'm also thinking about ranking the duplicate rows and somehow tell the variability chart to select only rows where (rank==1) but I'm not sure if it's even possible.

txnelson

Super User

Joined:

Jun 22, 2012

Solution
Since you are using a script to generate your output, either of the choices you have eliminated can actually be used. The data filter makes row state changes to your data table, and you can use "Make Row State Handler" to execute code that would delete the second data table, and then recreate it and it;s output. Your second option of not using a Data Filter for the second graph can also be used. But don't use a Data Filter, use a Local Data Filter for the second table. So your idea of having a Rank column is a good idea. The Local Data Filter would subselect on it. Your script can also collapse he Local Data Filter outline box to keep it from the users view.
Jim
Nir

New Contributor

Joined:

Nov 3, 2016

Thanks a lot, that's a brilliant.