cancel
Showing results for 
Search instead for 
Did you mean: 
Community_Admin
Community Team Member
Community Team Member

If you need to color columns in a column chart based on a different formula you will need to use the following solution.

For this example, we will color the columns that calculate [Total Cost] for the [City] by another value, that is calculated by the formula count([# Visits])

  1. You need to create 5 additional formulas using the function QUARTILE

 

  1. In the formula specify the following:

QUARTILE([Dimension], [Formula], 0)

[Dimension] - [City]

For the formula, it will be - [# of unique # Visits]

 

  1. In the first formula, you need to define 0 quartile - it will return the minimum value

 

  1. Copy the formula 4 times to get the values for all the quartiles. In each formula change the number of the quartile from 0 until 4. You will have the following formulas:

QUARTILE([Dimension], [Formula], 0)

QUARTILE([Dimension], [Formula], 1)

QUARTILE([Dimension], [Formula], 2)

QUARTILE([Dimension], [Formula], 3)

QUARTILE([Dimension], [Formula], 4)

 

Make sure you save all the formulas:

Community_Admin_0-1634651516418.png
  1. Go to the conditional formatting of the main formula in our case sum([Cost]) and modify the conditional formatting:

Community_Admin_1-1634651516661.png

 

6. You will need to specify 5 conditions.

 

Specify the following formula for the first condition:

CASE

WHEN [# of unique # Visits] = [Quart0] THEN [Total Cost]

ELSE 0

END

 

Second condition:

CASE

WHEN [# of unique # Visits] <= [Qurt1] THEN [Total Cost]

ELSE 0

END

 

Third condition:

CASE

WHEN [# of unique # Visits] <= [Quart2] THEN [Total Cost]

ELSE 0

END

 

Fourth condition:

CASE

WHEN [# of unique # Visits]<=[Quart3] THEN [Total Cost]

ELSE 0

END

 

Fifth condition:

CASE

WHEN [# of unique # Visits] <= [Quart4] THEN [Total Cost]

ELSE 0

END

 

  1. The [Quart0-4] (is the saved formula for the 0-4 quartile that we saved at step 4)

 

  1. Specify the colors accordingly:

Community_Admin_2-1634651515740.png
  1. Make sure that all the conditions are set to equal:
Community_Admin_3-1634651516092.png

Then you can disable the formulas to leave only the relevant columns on the widget:

Community_Admin_4-1634651512519.png

As a result, you have columns that are colored according to the calculation in another formula:

 

Community_Admin_5-1634651512516.png

 

Version history
Last update:
‎02-22-2024 12:41 PM
Updated by:
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: