Jump to content

Enkeled Kanaj

Members
  • Posts

    66
  • Joined

  • Last visited

  • Days Won

    1

Enkeled Kanaj last won the day on July 26

Enkeled Kanaj had the most liked content!

About Enkeled Kanaj

  • Birthday March 31

Converted

  • companyname
    One
  • country
    AL
  • productofinterest
    Visual Analytics - Spotfire

Recent Profile Visitors

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

Enkeled Kanaj's Achievements

  1. Hi, Just wanted to share how I created two property control list boxes with the same document property to manipulate the tables in a visualization graph. The script makes possible to switch the tables in the visualization when we go from one list box to the other list box. The script: from Spotfire.Dxp.Application.Visuals import * from Spotfire.Dxp.Application.Visuals import HtmlTextArea from Spotfire.Dxp.Data import DataTable kpi = Document.Properties["KPINRCELLDU"] vis = vis.As[Visualization]() # Step 1: Define the names of the tables from which you want to list columns table_name_1 = "DC_E_NR_NRCELLDU_RAW" # Replace with the actual first table name table_name_2 = "DC_E_ERBS_EUTRANCELLFDD_RAW (NR)" # Replace with the actual second table name # Step 2: Access the data tables by their names data_table_1 = Document.Data.Tables[table_name_1] data_table_2 = Document.Data.Tables[table_name_2] # Step 3: Create lists to hold the column names for each table column_names_1 = [] column_names_2 = [] # Step 4: Iterate over the columns in the first table and append their names to the first list for column in data_table_1.Columns: column_names_1.append(column.Name) # Step 5: Iterate over the columns in the second table and append their names to the second list for column in data_table_2.Columns: column_names_2.append(column.Name) if kpi in column_names_1: vis.Data.DataTableReference = Document.Data.Tables.Item["DC_E_NR_NRCELLDU_RAW"] vis.LineByAxis.Expression = "<[NR_NAME]>" vis.ColorAxis.Expression = "<[NRCellDU]>" elif kpi in column_names_2: vis.Data.DataTableReference = Document.Data.Tables.Item["DC_E_ERBS_EUTRANCELLFDD_RAW (NR)"] vis.LineByAxis.Expression = "<[ERBS]>" vis.ColorAxis.Expression = "<[EUtranCellFDD]>"
  2. Hi @Gaia Paolini and @Olivier Keugue Tadaa I did it with chatgpt. it was great from Spotfire.Dxp.Application.Visuals import * from Spotfire.Dxp.Application.Visuals import HtmlTextArea from Spotfire.Dxp.Data import DataTable kpi = Document.Properties["KPINRCELLDU"] vis = vis.As[Visualization]() # Step 1: Define the names of the tables from which you want to list columns table_name_1 = "DC_E_NR_NRCELLDU_RAW" # Replace with the actual first table name table_name_2 = "DC_E_ERBS_EUTRANCELLFDD_RAW (NR)" # Replace with the actual second table name # Step 2: Access the data tables by their names data_table_1 = Document.Data.Tables[table_name_1] data_table_2 = Document.Data.Tables[table_name_2] # Step 3: Create lists to hold the column names for each table column_names_1 = [] column_names_2 = [] # Step 4: Iterate over the columns in the first table and append their names to the first list for column in data_table_1.Columns: column_names_1.append(column.Name) # Step 5: Iterate over the columns in the second table and append their names to the second list for column in data_table_2.Columns: column_names_2.append(column.Name) if kpi in column_names_1: vis.Data.DataTableReference = Document.Data.Tables.Item["DC_E_NR_NRCELLDU_RAW"] vis.LineByAxis.Expression = "<[NR_NAME]>" vis.ColorAxis.Expression = "<[NRCellDU]>" elif kpi in column_names_2: vis.Data.DataTableReference = Document.Data.Tables.Item["DC_E_ERBS_EUTRANCELLFDD_RAW (NR)"] vis.LineByAxis.Expression = "<[ERBS]>" vis.ColorAxis.Expression = "<[EUtranCellFDD]>"
  3. Hi @Gaia Paolini and @Olivier Keugue Tadaa I want to simplify a little bit the python script because I am lazy to write all KPI names but need to make if the value comes from the first box then execute and if from the second list box then execute. kpi = Document.Properties["KPINRCELLDU"] vis = vis.As[Visualization]() if kpi == "NR NSA Leg Setup Success Rate (gNB)" or kpi == "NR NSA Leg Abnormal Release Rate (gNB)" \ or kpi == "EN-DC SCG PSCell change Success Rate - Intra gNB"\ or kpi == "EN-DC SCG PSCell change Success Rate - Inter gNB" or kpi..... how to do if kpi in list box 1
  4. Hi @David Boot-Olazabal Is there a step to run the report then save and send by email? We want to run the report then to send. Thanks
  5. Hi @Olivier Keugue Tadaa So definitely there no way to get the name of column as defined in script (the red color name)? SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmRrcConnReestAttQci" ELSE 0 END) AS "pmRrcConnReestAttQci_1"
  6. Hi, In the Information Link I have to do custom query where it can not produce the column without adding some dummy column which have to be in order corresponding to the order of the edited sql query. Is any simple way to get the columns queried inside the edited script without adding this dummy column? SELECT D1."DATE_ID" AS "DATE", D1."ERBS" AS "ERBS", D1."EUtranCellFDD" AS "EUTRANCELLFDD", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmErabEstabSuccAddedQci" ELSE 0 END) AS "pmErabEstabSuccAddedQci_1", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmErabEstabSuccInitQci" ELSE 0 END) AS "pmErabEstabSuccInitQci_1", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmErabRelNormalEnbUserInactivityQci" ELSE 0 END) AS "pmErabRelNormalEnbUserInactivityQci_1", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmErabEstabAttInitQci" ELSE 0 END) AS "pmErabEstabAttInitQci_1", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmErabEstabAttAddedQci" ELSE 0 END) AS "pmErabEstabAttAddedQci_1", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmErabEstabAttAddedHoOngoingQci" ELSE 0 END) AS "pmErabEstabAttAddedHoOngoingQci_1", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmRrcConnReestSuccQci" ELSE 0 END) AS "pmRrcConnReestSuccQci_1", SUM(CASE D1."DCVECTOR_INDEX" WHEN 1 THEN D1."pmRrcConnReestAttQci" ELSE 0 END) AS "pmRrcConnReestAttQci_1" FROM "DC_E_ERBS_EUTRANCELLFDD_V_RAW" D1 WHERE <conditions> GROUP BY D1."DATE_ID", D1."ERBS", D1."EUtranCellFDD";
  7. yes exactly, I saw the custom expression from a random graph and it was like that <BinByDateTime([DATE],"Year.Month.DayOfMonth",2) NEST [HOUR]>
  8. Hi @Gaia Paolini What is the syntax for the following when we have to add two dimensions like date and hour to xaxis or two columns to yaxis? vis.XAxis.Expression = "<Date>" vis.YAxis.Expression = "Sum(Sales)"
  9. HI @Gaia Paolini and @Olivier Keugue Tadaa Perfect solved. Name needed as string as Olivier said "DC_E_NR_NRCELLDU_DAY" So I use only one property control with column selection from different tables and show them to the same chart. thanks both, Olivier help with the first part even though I made a little different approach but the same idea. from Spotfire.Dxp.Application.Visuals import * from Spotfire.Dxp.Application.Visuals import HtmlTextArea kpi = Document.Properties["KPINRCELLDU"] vis = vis.As[Visualization]() if kpi == "NR NSA Leg Setup Success Rate (gNB)" or kpi == "NR NSA Leg Abnormal Release Rate (gNB)" \ or kpi == "EN-DC SCG PSCell change Success Rate - Intra gNB"\ or kpi == "EN-DC SCG PSCell change Success Rate - Inter gNB" or kpi == "NR Availability"\ or kpi == "NR DL MAC Volume (SA & NSA)" or kpi == "NR UL MAC Volume (SA & NSA)"\ or kpi == "Maximum DL MAC Throughput per NRCellDU (SA and NSA)"\ or kpi == "NR DL MAC UE Throughput (SA & NSA)"\ or kpi == "UL UE Throughput (SA & NSA)"\ or kpi == "Maximum UL MAC Throughput per NRCellDU (SA and NSA)": vis.Data.DataTableReference = Document.Data.Tables.Item["DC_E_NR_NRCELLDU_DAY"] vis.LineByAxis.Expression = "<[NR_NAME]>" vis.ColorAxis.Expression = "<[NRCellDU]>" elif kpi == "LTE EN-DC DL PDCP UE Throughput"\ or kpi == "NR NSA Session Setup Success Rate (eNB)"\ or kpi == "NR NSA Session Abnormal Release Rate (eNB)"\ or Dkpi == "LTE EN-DC DL PDCP Volume"\ or kpi == "LTE EN-DC Average Split Bearers per Cell"\ or kpi == "LTE EN-DC UL PDCP UE Throughput"\ or kpi == "Differentiated Intra-Frequency Cell Mobility Success Rate in LTE (EN-DC)"\ or kpi == "Differentiated Inter-Frequency Cell Mobility Success Rate in LTE (EN-DC)"\ or kpi == "NR NSA Leg Setup Success Rate (eNB)": vis.Data.DataTableReference = Document.Data.Tables.Item["DC_E_ERBS_EUTRANCELLFDD_DAY (NR)"] vis.LineByAxis.Expression = "<[ERBS]>" vis.ColorAxis.Expression = "<[EUtranCellFDD]>"
  10. Hi @Gaia Paolini thank you for your solution but there is something small error that we can fix the first table is known maybe from the input parameter vis from script parameters how to define the second? Traceback (most recent call last): File "<string>", line 32, in <module> NameError: name 'DC_E_ERBS_EUTRANCELLFDD_DAY_NR' is not defined IronPython.Runtime.UnboundNameException: name 'DC_E_ERBS_EUTRANCELLFDD_DAY_NR' is not defined at IronPython.Runtime.Operations.PythonOps.GetVariable(CodeContext context, String name, Boolean isGlobal, Boolean lightThrow) at IronPython.Compiler.LookupGlobalInstruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at Spotfire.Dxp.Application.IronPython27.IronPythonScriptEngine.ExecuteForDebugging(String scriptCode, Dictionary`2 scope, Stream outputStream)
  11. HI , Managed to create a property control which shows KPIs on the same visualization from different tables the script changes the vis.ColorAxis.Expression = "<[NRCellDU]>" and needs to include the "Line by" and "table" Which are the codes for respective "Line by" and "Data table" alike the below one for "Color By" vis.ColorAxis.Expression = "<[NRCellDU]>" from Spotfire.Dxp.Application.Visuals import * from Spotfire.Dxp.Application.Visuals import HtmlTextArea kpi = Document.Properties["KPINRCELLDU"] vis = vis.As[Visualization]() if kpi == "NR NSA Leg Setup Success Rate (gNB)" or kpi == "NR NSA Leg Abnormal Release Rate (gNB)" \ or kpi == "EN-DC SCG PSCell change Success Rate - Intra gNB"\ or kpi == "EN-DC SCG PSCell change Success Rate - Inter gNB" or kpi == "NR Availability"\ or kpi == "NR DL MAC Volume (SA & NSA)" or kpi == "NR UL MAC Volume (SA & NSA)"\ or kpi == "Maximum DL MAC Throughput per NRCellDU (SA and NSA)"\ or kpi == "NR DL MAC UE Throughput (SA & NSA)"\ or kpi == "UL UE Throughput (SA & NSA)"\ or kpi == "Maximum UL MAC Throughput per NRCellDU (SA and NSA)": vis.ColorAxis.Expression = "<[NRCellDU]>" elif kpi == "LTE EN-DC DL PDCP UE Throughput"\ or kpi == "NR NSA Session Setup Success Rate (eNB)"\ or kpi == "NR NSA Session Abnormal Release Rate (eNB)"\ or Dkpi == "LTE EN-DC DL PDCP Volume"\ or kpi == "LTE EN-DC Average Split Bearers per Cell"\ or kpi == "LTE EN-DC UL PDCP UE Throughput"\ or kpi == "Differentiated Intra-Frequency Cell Mobility Success Rate in LTE (EN-DC)"\ or kpi == "Differentiated Inter-Frequency Cell Mobility Success Rate in LTE (EN-DC)"\ or Dkpi == "NR NSA Leg Setup Success Rate (eNB)": vis.ColorAxis.Expression = "<[EUtranCell]>"
  12. Hi @Olivier Keugue Tadaa Now a new problem: want to add another formula from a another table to the property control but it recognizes only those from the first table
×
×
  • Create New...