Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to color code non aggregated tabular data based on increase of measure value ?

Hi All ,

How to color code non aggregated tabular data based on increase of measure value ?

Table

     

MeasureValueYearCountryRegionItemComponentBrand
Rank82010IndiaNorthAnalgesicBTBCipla
Rank82011JapanCentralSedativeAcetylamylinPfizer
Rank72009JapanCentralSedativeAcetylamylinPfizer
Rank72009KoreaCoastalSedativeAcetylamylinPfizer
Rank72009JapanBaySedativeAcetylamylinPfizer
Rank62009IndiaNorthAnalgesicBTBPfizer
Hold52010JapanCentralSedativeAcetylamylinLupin
Hold52010KoreaCoastalSedativeAcetylamylinLupin
Hold52010JapanBaySedativeAcetylamylinLupin
Hold42010IndiaNorthAnalgesicBTBLupin
Hold42011KoreaCoastalSedativeAcetylamylinLupin
Rejection_Index42013JapanBaySedativeAcetylamylinPfizer
Rejection_Index32011JapanCentralSedativeAcetylamylinPfizer
Rejection_Index32012JapanCentralSedativeAcetylamylinPfizer
Rejection_Index22011JapanCentralSedativeAcetylamylinPfizer
Rejection_Index22011KoreaCoastalSedativeAcetylamylinPfizer
Rejection_Index22011JapanBaySedativeAcetylamylinPfizer

OutPut

10 Replies
sunny_talwar

New code

Legend:

LOAD Measure,

    Value,

    Year,

    Country,

    Region,

    Item,

    Component,

    Brand

FROM

[Colour on Aggr Data.xlsx]

(ooxml, embedded labels, table is Table);

FinalTable:

LOAD *,

If(Measure = Previous(Measure) and Country = Previous(Country) and Region = Previous(Region) and

Item = Previous(Item) and Component = Previous(Component) and Brand = Previous(Brand) and Year > Previous(Year),

If(Value > Previous(Value), 'Positive',

If(Value < Previous(Value), 'Negative'))) as Trend

Resident Legend

Order By Measure, Country, Region, Item, Component, Brand, Year, Value;


DROP Table Legend;