Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare Value between Interval into a Table

Hello.

I hope I'll get help from here.

I have a table as follows:

range.png

The idea is: when I use a InputSum and insert, for example (-7) the table should filter and be like this:

filt.png

Also I want to save the unique value returned using a Variable, I am sure it would return just one row (and value).

Because (-7) is into the range from (-8) to (-5.1).

Thanks for the help.

1 Solution

Accepted Solutions
t_chetirbok
Creator III
Creator III

Hi!

You compare negative numbers, your expression must be

only(

{<SimRangoDesdeCosto="<=$(vInputSum)"}, SimRangoHastaCosto=">=$(vInputSum)"} >}

SimCostoPrecioPorcentaje)

If you'll compare positive numbers your set analysis look like {<SimRangoDesdeCosto=">=$(vInputSum)"}, SimRangoHastaCosto="<=$(vInputSum)"} >}

View solution in original post

6 Replies
t_chetirbok
Creator III
Creator III

Hello!

Use the straight table with dimensions "category","Date","RangeFROM","RangeTO" and expression only({<FROM={">=$(InputSum)"},TO={"<=$(InputSum)"}>}VALUE)

where InputSum is your variable

Anonymous
Not applicable
Author

How you are getting (-7)??

Is it a field or variable? Did you try with intervalmatch()?

Not applicable
Author

Hello, (-7) is a calculated value or an inputsum.

I used Intervalmarch in script, so I want a similar function but in a pivot or simple table.

I am trying to simulare scenarios, and I am using inputsum(fieldQTY) and inputsum(fieldPRICE), make calcs, etc. and compare the result value with those ranges to funally get the VALUE and save it into a variable.

Not applicable
Author

Hello Tatsiana, I think you've got my Idea. I´m doing all your instructions, but the result straight table is empty.

Would you please help me with more information about what i'm doing wrong.

Here in the link i have the application and the QVD.

sim_qvw_qvd

t_chetirbok
Creator III
Creator III

Hi!

You compare negative numbers, your expression must be

only(

{<SimRangoDesdeCosto="<=$(vInputSum)"}, SimRangoHastaCosto=">=$(vInputSum)"} >}

SimCostoPrecioPorcentaje)

If you'll compare positive numbers your set analysis look like {<SimRangoDesdeCosto=">=$(vInputSum)"}, SimRangoHastaCosto="<=$(vInputSum)"} >}

Not applicable
Author

Thank you for your help.