Khadar Basha Posted December 12, 2016 Share Posted December 12, 2016 Hi Friends, I am new to Spotfire.i have created the cross table.in that cross table i don't have data for Jul to Dec.i want to hide the column from Jul to Dec. it should be dynamic that menas, if tomorrow Jul data is available the Jul column need to be shown and other columns should be hide. could you please help to resolve the issue. thanks in advance for your help. Thanks, Basha Link to comment Share on other sites More sharing options...
Andrew Berridge Posted December 13, 2016 Share Posted December 13, 2016 Hi There, You can't `hide columns so you'll need to do it some other way - i.e. by affecting the values axis expression (the one at the bottom of the cross table). I recommend doing this using a multi-select list box control. Use an expression type control and set expressions for every month, like: Sum(If(Month([date])=1,[sales],0)) AS [Jan] Sum(If(Month([date])=2,[sales],0)) AS [Feb] etc. Then edit the custom expression on the values axis to be something like: Sum(if([Product]="A",3000,If([Product]="B",2050,If([Product]="C",2500,2300)))) / 6 as [Target], Sum([sales]) as [YTD Sales], $map("${monthsToShow}", ",") where monthsToShow is the name of the document property used for the multi-select listbox control. You could get clever with IronPython to set the axis expression based on the available data - it's not too difficult, but I recommend the above as a simpler solution to at least get you started. Andrew (TIBCO Data Science) Link to comment Share on other sites More sharing options...
Khadar Basha Posted December 13, 2016 Author Share Posted December 13, 2016 Hi Andrew Berridge, thanks for your reply, sorry to ask you. i have attched the sample application.can you please implement the logic and shared to me becuse i dont have idea on multi select list box. better if you share iron python script,because actual report is created on multi dimensions.i am unable share the screen shot becuse client security. Thanks, Basha Link to comment Share on other sites More sharing options...
Khadar Basha Posted December 26, 2016 Author Share Posted December 26, 2016 Hi Andrew Berridge, thanks for your reply, sorry to ask you. i have attched the sample application.can you please implement the logic and shared to me becuse i dont have idea on multi select list box. better if you share iron python script,because actual report is created on multi dimensions.i am unable share the screen shot becuse client security. Thanks, Basha Link to comment Share on other sites More sharing options...
Andrew Berridge Posted January 5, 2017 Share Posted January 5, 2017 Hi Basha, Thank you - I'm afraid I don't have time right now to implement the solution for you. Please start work on it based on what I have told you - use the simpler solution. If you get stuck, please post a comment to this question and I will try to help you with specific issues. Thanks, Andrew Link to comment Share on other sites More sharing options...
Neil Kanungo 2 Posted June 23, 2021 Share Posted June 23, 2021 # 'vis' is a script parameter # Import Modules from Spotfire.Dxp.Application.Visuals import * # Set row header column width to 0 (i.e. first column) vis.As[CrossTablePlot]().RowHeaderWidths.Item[0]=0 Link to comment Share on other sites More sharing options...
Alina Tudor Posted October 3, 2022 Share Posted October 3, 2022 Hello,I have tested and saw that the script works perfectly if you want to hide the first column from a crosstable visualization.How can I ajust the script to hide other columns in a cross table visualization (6th, 7th)? I want to hide the white columns, but I don't know how to achieve this.Thank you for your help. 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