Jump to content

How to get a variable based on if condition using iron python script

Recommended Posts

I would like to get the number of unique ids where the move type is 1. I know this can be done easily in iron python but I am stuck in this step.


from Spotfire.Dxp.Data import *

# getting the data table

tableName = 'table_name'

table = Document.Data.Tables[tableName]

# getting the column

column = 'MOVETYPE'


I don't know how to proceed further. I am expecting something like

if (movetype == 1):

unique_ids = len(set(list(id)))

and show this unique_ids in a text box chart in the dashboard.


Could anyone please kindly help me here (i am using spotfire 7.11 version)


or is there any way to achieve this without iron python


Thanks in advance :).

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...