Jump to content

Spotfire, Calculated Columns to show Percentages


Philip Connell

Recommended Posts

Do you want the results in new columns in that Cross Table you have If yes, perhaps you can share your dxp or sample data set which shows your exact configuration.

 

Or do you want to create calculated columns that calculate those totals If you want calculated columns, you would expressions like these (i made assumptions of the data table structure that the cross table is based on, so you might need to modify):

 

Count(If([Consent Indicator]='NO',[CUSTOMER_ID]) OVER ([Country],[Total Amount in Country])

/

Count([CUSTOMER_ID]) OVER ([Country],[Total Amount in Country]) as [% NO]

 

Count(If([Consent Indicator]='YES',[CUSTOMER_ID]) OVER ([Country],[Total Amount in Country])

/

Count([CUSTOMER_ID]) OVER ([Country],[Total Amount in Country]) as [% YES]

 

Count(If([Consent Indicator]='' or [Consent Indicator] is null,[CUSTOMER_ID]) OVER ([Country],[Total Amount in Country])

/

Count([CUSTOMER_ID]) OVER ([Country],[Total Amount in Country]) as [% Empty]

Link to comment
Share on other sites

  • 2 years later...

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