Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Expression to get the remark based on amount

Hi All,

I have below data set

  

IDRemarkAmount
1A100
1B200
1C300
2E250
2F300

Now I want the Remark for each ID where Amount is between 200 and 300. Below is the required output

  

IDAmountRemark
1200B
2250E
1 Solution

Accepted Solutions
Kushal_Chawda

Create the straight table

Dimension:

ID

Remark

Expression:

=sum({<Remark ={"=Sum(Amount)>200 and Sum(Amount)<300"}>}Amount)

View solution in original post

16 Replies
Kushal_Chawda

Create the straight table

Dimension:

ID

Remark

Expression:

=sum({<Remark ={"=Sum(Amount)>200 and Sum(Amount)<300"}>}Amount)

vikasmahajan

=sum({<Remark ={ 'B','E' }>}Amount)

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

I want the Remark based on amount where amount is between 200 and 300

kkkumar82
Specialist III
Specialist III

1.png

As per kush this is what you will get

_armoco_
Partner - Creator II
Partner - Creator II

Hi,

When you say between 200 and 300 does it include the upper and lower limit values as well?

In the sample output you provided, you've included the lower limit of the Amount value(200) however you didn't include the upper limit value(300)....

Anyway, using distinct in the back-end,  Amount>=200 and Amount<300 in the front-end, I could come up with this:

CaptureQV.PNG

Is this what you wanted?

Anonymous
Not applicable
Author

may be like this?

Dimesnion: ID, Remark

Expression: sum(if(Amount>200 and Amount<300, Amount))

_armoco_
Partner - Creator II
Partner - Creator II

Hi,

This also seems to work:CaptureQV.PNG

Thanks and Regards,

Arjun

sunny_talwar

When you say between 200 and 300 does it include the boundary values 200 and 300 or not? Why did you include B for ID 1 and exclude C for the same ID?

Similarly, you excluded F for ID 2

Capture.PNG

What would happen if you have something like this

ID, REMARK, AMOUNT

3, G, 300

3, H, 400

Would you now pick ID 3 and remark G or you won't?

Not applicable
Author

No sunny, I wont pick that, I just want the ID or remark where Amount is in between 200 and 300.