Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

Hi All

I have a Table 1 , which consist of 8 Segment.

I like to know how to make the Table 1 , only display 2 Segment :-

Related Coy = 88.44%

Other            = 11.54%

One of the way i aware is recode from SEGMENT field 2 value label, which need to modify the script , i am thinking , it is possible to do it using expression on the table.

Paul

1 Solution

Accepted Solutions

Re: Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

Hi Paul,

Try this calculated dimension expression,

=If(SEGMENT='Related Coy','Related Coy','OTHERS')

6 Replies
paulyeo11
Valued Contributor II

Re: Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

my QVW

Re: Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

How about using Dimension limits? But this probably won't work in Qlik Sense. Are you going to be looking for a solution that can work in Qlik Sense?

Capture.PNG

paulyeo11
Valued Contributor II

Re: Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

Hi Sunny

Many thank for your sharing. By the way since i am using Ver 9 , it does not have these feature also. Okay look like i have to skip this. Since QS also unable to do this.

Paul

Re: Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

Here is a solution which will work in Qlik Sense and probably in your version as well

Capture.PNG

Expression1:

Num(

Sum(Aggr(If(SEGMENT = 'Related Coy',

Sum({<SEGMENT *= {'Related Coy'}>}

If( US_Cust='USD', 1.3,

If( US_Cust='RP', 0.0001,

if( US_Cust='EU',1.5, 1)))* days3)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days6)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days9)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1)))*above12)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * curren),


If(SEGMENT = 'OTHERS',

Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If( US_Cust='USD', 1.3,

If( US_Cust='RP', 0.0001,

if( US_Cust='EU',1.5, 1)))* days3)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days6)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days9)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1)))*above12)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * curren))), SEGMENT))

,'###,##0.00')

Expression2:

Num(

If(SEGMENT = 'Related Coy',

Sum({<SEGMENT *= {'Related Coy'}>}

If( US_Cust='USD', 1.3,

If( US_Cust='RP', 0.0001,

if( US_Cust='EU',1.5, 1)))* days3)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days6)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days9)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1)))*above12)

+ Sum({<SEGMENT *= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * curren),

If(SEGMENT = 'OTHERS',

Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If( US_Cust='USD', 1.3,

If( US_Cust='RP', 0.0001,

if( US_Cust='EU',1.5, 1)))* days3)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days6)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * days9)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1)))*above12)

+ Sum(TOTAL{<SEGMENT -= {'Related Coy'}>}

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.0001,

if ( US_Cust='EU',1.5, 1))) * curren)))

,'###,##0.00')

Re: Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

Hi Paul,

Try this calculated dimension expression,

=If(SEGMENT='Related Coy','Related Coy','OTHERS')

Re: Table with 8 value label How to make it only 2, Only display Related Coy and Other % & Amount ?

Very Smart

Community Browser