How to create a new table based on existing visualization (cross table) and current filtering in TIBCO Spotfire Using Iron Python Scripting

Want to extract data from a cross -table visualisation into a new data table for further analysis. The new table needs to be refreshed everytime the filtering changes, and consequently the visualisation.