Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sona_sa
Creator II
Creator II

Expression Help

Hi Friends,

I have Some no. of raw data, Now I have to make an expression Like - In Others Row - The Value will substract the Value from Top 50 Row.

I have given the Input and Output in attached xls. Please check the xls and help me to make an expression for the same.

Thanks.

Labels (2)
16 Replies
NitinK7
Specialist
Specialist

if you can see below screenshot there are multiple 

RESIDENT INDIVIDUALS and PUB then which specific record do you wnat to perform your minus operation

 

NitinK7_0-1638969834076.png

 

sona_sa
Creator II
Creator II
Author

Yes, I want the same.

Thanks

NitinK7
Specialist
Specialist

if you wnat the same ,then can you please let me know which output do you want

based on your given STOCK.excel file?

when we write the below code then getting only first record from the table.

Let v_Others=Peek('Cases',0,'Stock_Temp1');

 

 

sona_sa
Creator II
Creator II
Author

But I have to substract the numbers from Residents Individuals - PUB. That how I will do the same.

NitinK7
Specialist
Specialist

you are right,

I just wnat to know what output /result do you want, because if you can see there are 2 different values/Cases for RESIDENT INDIVIDUALS and there and multiple PUB with null values/Cases.

so which one of the following is true

1.  RESIDENT INDIVIDUALS (133526)   -  PUB (0 ) -------// case value define in bracket

2.  RESIDENT INDIVIDUALS (136056)   -  PUB (0 ) -------// case value define in bracket

sona_sa
Creator II
Creator II
Author

Hi Nitin,

It is OK, we will see the data week wise, So there is no problem, If we do the same for first record of data, But I have to do substract from v_Others - v_PUB.

I need output like - 136057 - 50 = 136007

Thanks

sona_sa
Creator II
Creator II
Author

I know - 

But Instead of PUB(0), It should be PUB(50). 

Because after this logic same logic I will use for next expression. for Shares. for amount.

😂.