Jump to content

How to hide column's in cross table


Khadar Basha

Recommended Posts

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

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

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

  • 2 weeks later...

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

  • 2 weeks later...

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

  • 4 years later...
  • 1 year later...

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.Capture1.thumb.JPG.26de263e7fab4a87a6b9f38e46739ac8.JPG

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...