Sanandh C k Posted March 10, 2021 Share Posted March 10, 2021 I have marked some data in dashboard , I want to show the unique values from a particular column which is unmarked in text area. Is it possible Link to comment Share on other sites More sharing options...
Sanandh C k Posted March 16, 2021 Author Share Posted March 16, 2021 Here is the Answer for above question: from System.Collections.Generic import List from Spotfire.Dxp.Data import * cursor = DataValueCursor.CreateFormatted(dataTable.Columns["City"]) markings = Document.ActiveMarkingSelectionReference.GetSelection(dataTable) rowCount=dataTable.RowCount MarkedRowIndex=List[int](); markedata = List [str](); for i in markings.AsIndexSet(): MarkedRowIndex.Add(i) print MarkedRowIndex #RowIndex for row in dataTable.GetRows(cursor): if row.Index not in MarkedRowIndex: print row.Index value= cursor.CurrentValue if value str.Empty: markedata.Add(value) valData = List [str](set(markedata)) SelectedValues= ', '.join(valData) print SelectedValues Document.Properties["SelectedValues"]='' Document.Properties["SelectedValues"]=SelectedValues Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now