Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaskarsharma03
Creator
Creator

Conditional Minimum

Hi,

I need to find minimum from a list after excluding everything <=0, blanks, spaces and NULL values. I have attached two files to explain the requirement. Any help will be very much appreciated.

Thanks

3 Replies
Sokkorn
Master
Master

Hi Bhaskar,

I would suggest to add new field for easy control in expression.

FindMinValue:

LOAD *,If(Values<=0 or Len(Values)<1,0,1)    AS [Cond];

LOAD * INLINE [

    Region, Values

    East, -1

    East, 0

    East

    East, 5

    North, 23

    North, 7

    North, 7

    North, 0

    North, 25

    North, 7

    South, 9

    West, 55

    West, 23

    West, 23

    North-East,

    North-East,

    North-East, 0

];

After load data, let try create straight table with:

1. Dimension: Region

2. Expression: Min({$<Cond = {1}>}Values)

See sample attached file

Regards,

Sokkorn

Anonymous
Not applicable

better to use directly the inline table and a set analysis for the min values


Min({$ <Values={">0"}>}  Values)

For the North-East where the result is NULL, you can work with the Presentation and the Suppress Zero-Values and the Null Symbol

Not applicable

Hi,

Try like this in script.

MinValue:

LOAD Region as Reg,

  Min(Values) as MinVal

Group by Region;

LOAD Region, Values

Resident FindMinValue

where len(Trim(Values))>0 and Values <> 0 and not IsNull(Values);

Hope it works.