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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

Above function

hi,

I'm trying to use above function in a bar chart but it is giving me null..

here is the table i'm using:

QRKey1Revenue
4/201301085.00000000000
1/201411089.00000000000
2/201421107.00000000000
3/201431096.00000000000
4/201441172.00000000000
1/20155-
2/20156-
3/20157-

and in the chart the dim is QR and EXP=

if(  Key1>4 , above(Revenue) *2 ,Revenue)

1 Solution

Accepted Solutions
Not applicable

hi,

Label you expression as Rev1

and use the following Expression

if(  Key1>4 , Above(Rev1) *2 ,Revenue)

As it is wrking on my side

View solution in original post

11 Replies
er_mohit
Master II
Master II

enclose it with sum

like

if(  Key1>4 , above(sum(Revenue)) *2 ,sum(Revenue))


Not applicable

Hi,

     you can done this in load script also.

try this,

LOAD

      QR,

     Key1,

     Revenue,

  If(Key1 > 4, Peek('NewRevenue') * 2, Revenue) As NewRevenue

From table.

I hope this helps you

Regards,

Ashutosh

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this in script it is easier and efficient

LOAD

*,

If(Key1 > 4, Peek('NewRevenue') * 2, Revenue) AS NewRevenue

FROM DataSource;

Hope this helps you.

Regards,

Jagan.

alec1982
Specialist II
Specialist II
Author

Hi,

Inclose with Sum didn't help.

I cannot do in script because the actual expression is if(  Key1>4 , above(Revenue) *$(vHC) ,Revenue)

where vHC is a variable entered by the user.. so it needs to be on the expression..

Thxs,

Alec

Not applicable

Hi,

Name your expression as Revenue1 and use the following expression in chart

if(  Key1>4 , Above(Revenue1) *2 ,Revenue)

alec1982
Specialist II
Specialist II
Author

Hi,

Thxs for the help but it didnt work too..

Not applicable

can you attached sample file or an JPG image what you want to achieve when it is null.

alec1982
Specialist II
Specialist II
Author

The source data is as shown above ..very simple table and the expression and dim are defined above too.

the result table should look like:

QRKey1Revenue
4/201301085.00000000000
1/201411089.00000000000
2/201421107.00000000000
3/201431096.00000000000
4/201441172.00000000000
1/201552344
2/201564688
3/201579376

Thxs for all your help

Not applicable

hi,

Label you expression as Rev1

and use the following Expression

if(  Key1>4 , Above(Rev1) *2 ,Revenue)

As it is wrking on my side