Uniform Colour Coding.qvw

    This topic explains how can we color the chart with our defined colors.
    Here are the steps to achieve. For this i have taken an example that Sales amount in Different AgeBands like
    Future Due
    0 to 30 Days
    31 to 90 Days etc..

    1. Define the colors for different Age Bands like below in an excel file. I have attached this excel file for the refrence.
    AGE Band Red Green Blue
    Future Due 141 171 203
    0 to 30 Days 0 255 0
    31 to 90 Days 255 255 0
    91 to 120 Days 240 160 80
    121 to 365 Days 255 102 102
    1 to 3 Yrs 255 0 0
    3 to 5 Yrs 204 0 0
    5 Yrs Over 153 0 0

    2. Create a FACT Table with some Sales Amount like below.(attched)

    AGE Band Quantity Sales Amount
    121 to 365 Days 78 1078
    Future Due 8 1008
    5 Yrs Over 81 1081
    0 to 30 Days 11 1011

    3. Open a new Qlikview Dashboard and save the file first.
    4. Go to Edit Script and Copy paste the below code. This loads our Color code.

    Color_Code:
    LOAD [AGE Band],
         Hue,
         Sat,
         Lum
    FROM
    [Colour Coding.xlsx]
    (ooxml, embedded labels, table is Coloring);

    5. Next Load the FACT Table as below.
    FACT:
    LOAD [AGE Band],
         Quantity,
         [Sales Amount]
    FROM
    [Colour Coding.xlsx]
    (ooxml, embedded labels, table is Values);

    6. Reload the application ans save it.

    7. Create a Pie chart with Dimension as AGE Band & Expression as sum([Sales Amount])

    8. Open Backgound of Expression by clicking on + sign before expression and paste the below exp.
    =RGB(Red, Green,Blue)

    9. Now finish it.

    10 You can see the Report reflecting with defined colors.