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: 
Not applicable

Add percentage values row based on other unique numeric row in the same table chart.

Hello everyone,

This is my problem.

I have a Table chart with only one row :

Num1 Num2 Num3

150      80         70

Num2 and Num3 are part of Num1 (Num2+Num3 = Num1)

I would like to add another row in this table where I can have a final table like this one.

          Num1 Num2 Num3

value 150     80          70

perc    150     53%     47%

I saw something like that in the community long time ago, but I wasn't able to find it again.

NB. Num1 Num2 and Num 3 are expressions.

Thank you in advance.

1 Reply
Kushal_Chawda

Create Pivot Table

Dimensions:

1) Valuelist ('Value','Perc')

2) Valuelist ('Num1','Num2','Num3')

Expression:

If(Valuelist ('Value','Perc')='Value' and Valuelist ('Num1','Num2','Num3') ='Num1',

Num1Expression,

If(Valuelist ('Value','Perc')='Value' and Valuelist ('Num1','Num2','Num3') ='Num2',

Num2Expression,

If(Valuelist ('Value','Perc')='Value' and Valuelist ('Num1','Num2','Num3') ='Num3',

Num3Expression,

f(Valuelist ('Value','Perc')='Perc' and Valuelist ('Num1','Num2','Num3') ='Num1',

Num1Expression,

If(Valuelist ('Value','Perc')='Perc' and Valuelist ('Num1','Num2','Num3') ='Num2',

num(Num1Expression/Num2Expression,'#0.00%'),

If(Valuelist ('Value','Perc')='Perc' and Valuelist ('Num1','Num2','Num3') ='Num3',

num(Num1Expression/Num3Expression,'#0.00%')))))))


Drag the Num dimension on Expression