Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
Valued Contributor

Re: Compare Value between Interval into a Table

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
Valued Contributor

Re: Compare Value between Interval into a Table

Hello!

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

where InputSum is your variable

balrajahlawat
Esteemed Contributor

Re: Compare Value between Interval into a Table

How you are getting (-7)??

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

Not applicable

Re: Compare Value between Interval into a Table

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

Re: Compare Value between Interval into a Table

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
Valued Contributor

Re: Compare Value between Interval into a Table

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

Not applicable

Re: Compare Value between Interval into a Table

Thank you for your help.