Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Positive value works, but not negative values does not work in set analysis

Hi,

I have the following expression, it gives me the description of the Instrument with the highest Marketvalue,which works fine:

=

Minstring({< MarketValue = {$(=Num(Max({<[Sector] = {'Equity'}>} MarketValue)))} >} [InstrumentDescription])

However, when I try this to get the Instrument with the lowest MarketValue I get nothing returned, Iuse the below expression.

=

Minstring({< MarketValue = {$(=Num(Min({<[Sector] = {'Equity'}>} MarketValue)))} >} [InstrumentDescription])   

Any help is appreciated....

Regards

Razak

1 Solution

Accepted Solutions
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

Use this expression

=Minstring({< Value ={'$(=Num(Min({<[AssetClass] = {'Equity'}>} Value)))'} >} Distinct [Security])

Regards

Perumal

View solution in original post

8 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Did you mean to switch [Sector] with [AssetClass]?  If so, what are the dimensions?

Anonymous
Not applicable
Author

Hi,

I am using this expression in a text box object, and both are suppose to be Sector, I have edited the above post.

Thanks

swuehl
MVP
MVP

Could you tell us a bit more about your data model?

Have you tried putting

=Num(Min({<[Sector] = {'Equity'}>} MarketValue))

in a text box and then selecting this value in field MarketValue and check the possible values of InstrumentDescription?

Anonymous
Not applicable
Author

Hi,

I did that

=Num(Min({<[Sector] = {'Equity'}>} MarketValue)),

I get a Value for this and i checked whether there exists an InstrumentDescription for this value,

The expression:

=

Minstring({< MarketValue = {$(=Num(Min({<[Sector] = {'Equity'}>} MarketValue)))} >} [InstrumentDescription])


it does return a value when the minimum is positive however when the value is negative I get nothing.

Sorry forgot to add that in.

Kind Regards

Razak

swuehl
MVP
MVP

I assume that your issue is a formatting issue.

What is your standard numerical format? Do you have decimals in your numbers?

Have you tried enclosing the dollar sign expansion into single quotes?

Could you post a small sample QV file here to the forum?

Anonymous
Not applicable
Author

Hi, please see attachment, the red textbox is the problem.

Thanks for the help.

Regards

Razak

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

Use this expression

=Minstring({< Value ={'$(=Num(Min({<[AssetClass] = {'Equity'}>} Value)))'} >} Distinct [Security])

Regards

Perumal

Anonymous
Not applicable
Author

Thank You!!!