Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator II
Creator II

Percent Calculation in Straight tbl

Hi All

I am here addressing the Expression and Number tabs in Straight table to show value in percentage.

I want to know the difference between Relative checkbox in Expression tab and in Number tab the 'fixed to' with enabling 'show in percent'.

I am using below expression in straight table to calculate the Year to Date Variance-

(Column(1) - Column(2)) / Column(1)

When I select relative checkbox in expression tab, i get 100% as value in my straight table column.

when i select 'fixed to' 2 Decimals and enable show in percent, i get the right percentage value.

Please let me know the usage of Relative checkbox and 'fixed to with show in percentage'.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

first expression              sum(sales)

second expression         sum(sales)          relative checked

third expression             sum(sales)          relative checked          formatted in number tab show in %

1.png

use number tab for formatting

use relative if you want Qlikview calculates the %

in your case you calculates the %, so don't check relative, just format

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Consider below script...

Load * Inline

[

  Customer, Sales

  A, 100

  B, 120

  C, 300

  D, 500

  E, 50

];

Create a straight table

Dimension = Customer

Expression

1) SUM(Sales)

2) SUM(Sales)/SUM(Total Sales)     Number Tab Fixed to 2 Decimals and Show in %

3) SUM(Sales)      Relative Ticked

Here 2nd and 3rd will give you same result.

maxgro
MVP
MVP

first expression              sum(sales)

second expression         sum(sales)          relative checked

third expression             sum(sales)          relative checked          formatted in number tab show in %

1.png

use number tab for formatting

use relative if you want Qlikview calculates the %

in your case you calculates the %, so don't check relative, just format