Jump to content

PBR

Members
  • Posts

    35
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PBR's Achievements

  1. Thank you very much David and Andreas, The custom formatting fixed the issue.
  2. Hello, I am using Spotfire Analyst 12.0.4 with the DateTime format 'yyyy-MM-dd h:mm tt'. However, when I save a copy as a library item and open it in a web browser, the time format changes to 'MM/dd/yyyy h:mm tt', which causes errors in the dashboard functionalities, particularly in those IronPython scripts that rely on the time format. I would like to know how I can prevent this change in the DateTime format. Thank you,
  3. Yes, my code is removing the row but exactly due to using IndexSet(), I get errors. Could you please share your script that I can see how to use RowId()? Thanks
  4. Thank you Gaia, I was doing a similar method in data functions, but I want to avoid creating a new column and keep the same column. That would affect the rest of my jobs doing on the table.
  5. Hello, I have a table that includes multiple columns in which one of the columns is named "ID" corresponds to the number of records. I also have a delete button to remove any selected rows from the table. However, the row number under "ID" is getting messed up if I delete a row in between. So, I was looking to update the numbers for "ID" column as I delete the rows. Here is my IronPython script but not sure exactly how to update that. from Spotfire.Dxp.Data import IndexSet, DataValueCursor dataTable = Document.Data.Tables["Events"] markings = Document.ActiveMarkingSelectionReference.GetSelection(dataTable) # Remove the selected rows dataTable.RemoveRows(markings) # Get reference to the 'ID' column idColumn = dataTable.Columns["ID"] idCursor = DataValueCursor.Create(idColumn) rowCounter = 1 # Create an IndexSet to cover all remaining rows after deletion remainingRows = IndexSet(dataTable.RowCount, True) # Update the ID in the remaining rows for rowIndex in range(dataTable.RowCount): if remainingRows.Contains(rowIndex): dataTable.SetValue(idCursor, rowIndex, rowCounter) rowCounter += 1 but I am getting this error: TypeError: expected IndexSet, got int I could update the numbers through a data function and introducing a new column but I am looking to do that through IronPython. Thank you
  6. I am wondering if I can concatenate a document property and a calculated column? I am looking to have the selected month and years on the category axis. for example, if I select the January from the list box, then I could have: January 2006, January 2007, ... on my category axis I cannot concatenate them by any ways: Display_Year :::::: If(([Month_String]="${Months}") and ([Year]>=2005) and ([Year]<=2025), Concatenate(${Months}, [Year]), NULL)
  7. Hi Jose, I tried method 2 and 3. I used method 2 when the zoom slider is on, and when I want to synch it manually. However, I am using markings as well as it is much simpler as you mentioned, and I can limit both graphs to that marking. Thank you
  8. Hello I have a dataset with columns: Time, Col1, Col2, and Col3 that is externally imported to Spotfire. I want to have a bar chart to show the average value of Col1-3 for the specific selected month through a listbox. I am using this expression for the category axis: <If(([Month_String]="${Months}") and ([Year]>=2005) and ([Year]<=2025), [Year], NULL) as [Year]> where Month_String is the calculated column to get the name of each month, ${Months} is a document property of string type, and Year is calculated column as integer. The y axis expression is: $map("Avg($esc(${SelectColListBox}))", ",") Where SelectColListBox is a document property to get the Col name. I am also using an expression to limit the data: ([Time]>=DocumentProperty("StartDate")) and ([Time]<=DocumentProperty("EndDate")) Everything is working well except that there is an extra bar on my chart that is named as "Empty" which shows the average of all values within other months. Any idea why the bar is there and how to remove that bar?
  9. Thank you Jose, Thank was exactly what I was looking for.
  10. Thank you Jose This an example of my problem. It is based on some fake data. I don's see the similar issue as I see in my real case, but still it is not working. I hope to understand the issue to extend it to my real case. Test_Sync_Zoomslider.dxp
  11. Thank you Jose for your reply. When I print rounded_low or rounded_high, it is showing the right numbers. But it still cannot implement the binned dates on x-axis. The second line chart is updating like below:
  12. Hi Gaia, Using the filter leads to a sudden shift in visualizing the data. However, using the zoom sliders provides a smoother zooming experience. I tried using the filter, but it makes it difficult to track the specific time we are looking for.
×
×
  • Create New...