Nov 6, 2014

how to pass multiple values using parameter to spotfire chart

"$map("${multiselectlist}", ",")"~=[ParentNode]

Oct 31, 2014

Python script for Barchart label change percentage/value

from Spotfire.Dxp.Application.Visuals import BarChart
from Spotfire.Dxp.Application.Visuals import LabelInformationType
from Spotfire.Dxp.Application.Visuals import BarChartOrientation
from Spotfire.Dxp.Application.Visuals import StackMode

barChart=viz.As[BarChart]()
if dollor=="yes":
barChart.StackMode=StackMode.Stack
barChart.SegmentLabelInformationType=LabelInformationType.Value
else:
barChart.StackMode=StackMode.Stack100Percent
barChart.SegmentLabelInformationType=LabelInformationType.Percentage



Oct 3, 2014

Show/Hide columns dynamically in table visualization in Spotfire

Create a script with 2 scripts parameters: name: showCol type: String value: "${Control}" name: tablePlot type: Visualization value: Page > Table Script: from Spotfire.Dxp.Application.Visuals import * if showCol == 'id': cols=['ID1','ID2'] elif showCol == 'type': cols=['Type1','Type2'] else: cols=['CD1','CD2'] tablePlot.As[TablePlot]().Columns.Clear() tablePlot.As[TablePlot]().Columns.AddRange(cols)

Sep 18, 2014

Spotfire scripts

http://spotfired.blogspot.com/2014/07/change-date-rangefilters-porgramatically.html

Jun 6, 2014

Spotfire Datasource creation

1.Type: Oracle(direct client) jdbc:tibcosoftwareinc:oracle://server_instance_name:portid;SID=databaseName 2. SQL Server (2005 or newer) jdbc:sqlserver://server_instance_name:portid;

May 15, 2014

Sub Average in cross table on spotfire

[USER_ID] NEST [NETWORK] NEST Sum([Amount]) over ([USER_ID]) / UniqueCount(if([NETWORK] is null," ",[NETWORK])) over ([USER_ID]) as [Avg]

May 14, 2014

check and Uncheck CheckBox Filter in Spotfire

from Spotfire.Dxp.Application.Filters import CheckBoxFilter plFilter=Document.FilteringSchemes[0].Item[tab].Item[tab.Columns.Item["NETWORK"]].As[CheckBoxFilter]() values = plFilter.Values for value in plFilter.Values: if plFilter.IsChecked(value): plFilter.Uncheck(value) else: plFilter.Check(value)

May 13, 2014

Spotfire Cross table sub total

in vertical axes add below expression for Avg percentage Avg([Counts]) / First([Counts]) in vertical axes add below expression for total value Sum([Counts]) / First([Counts])

May 12, 2014

Spotfire Migration steps


Migrate an Information Model to point to a new database We now have quite a few customers who are actively trying to migrate from a Test Spotfire Server to a Production Spotfire Server. The issue is that in many cases they want the Data Source on Test to point to \\test-database and they want a Data Source with the same GUID on Production to point to \\production-database . These instructions are for Spotfire Server 3.0 only and require separate Test and Production servers of Spotfire Server (SS). Start with a Data Source (DS), Information Elements (IEs), an Information Link (IL) and DXP file that uses that IL on the Test Spotfire Server (TSS). DS points to \\test-database and is in a different SS folder that the IEs, IL or DXP file. Export the folder on the Test SS that contains the DS Import that folder on to the Production SS, choosing the option to maintain GUIDs Modify DS on the Production SS so the connect string points to \\production-database After this step do not migrate the DS again to the Production DSS Export the folder on the Test SS that contains the IEs, IL and DXP file Import that folder on to the Production SS When you open the DXP file from the Production SS Library it should connect to DS through the \\production-database http://spotfirecommunity.tibco.com/community/blogs/stn/archive/2009/12/03/migrate-an-information-model-to-point-to-a-new-database.aspx

May 7, 2014

TIBCO Spotfire Application Data Services

http://ec2-23-21-157-174.compute-1.amazonaws.com/products/application-data-services.aspx

Active Space in Spotfire

http://spotfirecommunity.tibco.com/community/forums/p/4993/17518.aspx#17518

Apr 30, 2014

Create New Column on spotfire Data table using python script

curDT = Document.ActiveDataTableReference cols = curDT.Columns #targetCol = Document.Properties["myColumnSelection"] #Create a new column that counts the comma delimiter myExpression = "sum([Goods]) over([statecode])" myNewColName = cols.CreateUniqueName("TotalRevenue") cols.AddCalculatedColumn(myNewColName, myExpression)

Apr 3, 2014

Select Deselect all values using python script in Spotfire

from Spotfire.Dxp.Application.Filters import CheckBoxHierarchyFilter plFilter=Document.FilteringSchemes[1].Item[tab].Item[tab.Columns.Item["Region"]].As[CheckBoxHierarchyFilter]() if Document.Properties.Item["Status"]=="All": plFilter.UncheckAllNodes() Document.Properties.Item["Status"]="None" else: plFilter.CheckAllNodes() Document.Properties.Item["Status"]="All"

Mar 31, 2014

Finding Previous value in bar chart spotfire

(Sum([PRINCIPALAMTINTRADECURR]) - Sum([PRINCIPALAMTINTRADECURR]) OVER (Previous([Axis.X]))) / Sum([PRINCIPALAMTINTRADECURR]) OVER (Previous([Axis.X]))

Mar 24, 2014

Data table with stored procedure (with parameter) in spotfire

You can use stored procedure in information link instead elements in Information Link, Note: we cannot find the parameters in information link when you create but, when you add this info link through "Data on Demand" it prompt you to assign parameter values. Steps below Information Designer: 1. Data source: Expand Server->schema -> procedure name (right click) -> New -> Procedure (save) 2. Library (Element tab): Saved procedure (right click) ->New-> Information Link (Save) File ->Add On-Demand data Table -> choose Information link ->define Input for each parameter (fixed value/property/expression/marking etc)

Mar 21, 2014

Axis zoom range in Scatter plot spotfire

from Spotfire.Dxp.Application.Visuals import AxisRange from Spotfire.Dxp.Application.Visuals import ScatterPlot for vis in Application.Document.ActivePageReference.Visuals: if vis.Title == "Alerts": MyChart = vis.As[ScatterPlot]() MyChart.XAxis.ZoomRange = AxisRange(StartDate,EndDate); MyChart.YAxis.ZoomRange = AxisRange.DefaultRange;

Mar 12, 2014

Choose different column as Axis based on parameter value in Tibco Spotfire

case "${Column}" when "EXECUTION" then [LONG_EXECUTION] when "EXEVOLUME" then [VOLUME] when "COUNT" then [LONG_COUNT] end as [${Column}]

Feb 19, 2014

Differrence between tow rows in spotfire

sum([TUP]) OVER ([Row]) - sum([TUP]) OVER (previous([Row]))