Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: rboccuzziYou have the correct idea, the rotate node needs to know what value to put in each of the different fields for each pivot group. It might be a nice enhancement to have it put in a NULL (or some specified default value) if a field doesn't get a value for a given pivot group.
For your example above, you of course need to add the value field, all you are showing is the pivot field and the name field. When you add the value field and set it to 1 or 0, that is the full set of what you need.
In your graph, you are doing everything correctly (or almost everything The graph is failing because the original data has multiple rows for a given MDN, so when you join them with a constant value to the fixed set of AuditCodes, you end up with duplicates you don't want. This is what is breaking rotate, because you will end up for these MDNs having multiple "sets" of audit codes, so too many in a pivot group.
Once you remove these dups, it works. Not sure exactly what you are trying to do, but the easiest way might be to sort on MDN, AuditCode2, and Value (so all the 0's in the value are first, as you want), and then to sort uniquely (and stablely! if you don't sort stable, it won't reliably work!) on MDN, AuditCode2. That seemed to do what you wanted.
Cheers
$Rich<br><br>Post edited by: rboccuzzi, at: 2008/06/04 17:55