# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
Contributor III

## expression

hi,

i have an expression-

=COUNT({<Division={"=Aggr(Sum({<METRIC=,COMPONENETID={'49'}>}COMPONENTVALUE)/Sum({<METRIC=,COMPONENETID={'50'}>}COMPONENTVALUE)*100,Division)>70"}>}DISTINCT Division)

i have the value >70 in a field 'minvalue' how can i change the expression  to take the >70 from the field?

1 Solution

Accepted Solutions
Highlighted
Honored Contributor

## Re: expression

Ok give this a crack

=\$(='COUNT({<Division={"=Aggr(Sum({<METRIC=,COMPONENETID={''49''}>}COMPONENTVALUE)/Sum({<METRIC=,COMPONENETID={''50''}>}COMPONENTVALUE)*100,Division)'&minvalue&'"}>}DISTINCT Division)')

12 Replies
Highlighted MVP

## Re: expression

May be this? I am not sure you are looking this

=COUNT({<Division={"=Aggr(Sum({<METRIC=,COMPONENETID={'49'}, value = {'\$(=Min(value))'} >}COMPONENTVALUE) /

Sum({<METRIC=,COMPONENETID={'50'}, value = {'\$(=Min(value))'} >}COMPONENTVALUE) *100,Division)>70"}>} DISTINCT Division)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted MVP

## Re: expression

Hi,

why not try simple count(if())

count(if(Sum(Aggr(Sum({<METRIC=,COMPONENETID={'49'}>}COMPONENTVALUE)/Sum({<METRIC=,COMPONENETID={'50'}>}COMPONENTVALUE)*100,Division))>70,distinct Division))

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Highlighted
Honored Contributor

## Re: expression

Is 70 the only value in the field? Is it linked to your other data?

Assuming its a singular value you could use something like this (sorry I might have the syntax slightly out)

=COUNT({<Division={"=Aggr(Sum({<METRIC=,COMPONENETID={'49'}>}COMPONENTVALUE)/Sum({<METRIC=,COMPONENETID={'50'}>}COMPONENTVALUE)*100,Division)={">\$(=only({1}minvalue)"}"}>}DISTINCT Division)

Highlighted
Contributor III

## Re: expression

its not only 70 and its not always >

it can be <20

=15

if it was just the number it was easy

Highlighted
Honored Contributor

## Re: expression

OK but how is this number derived?

how is it linked to your data or how is it input?

Highlighted
Contributor III

## Re: expression

i have a table with the fields metric_id, minvalue

in this screen only one metric_id must choosen

and then i have the only minvalue for this metric_id

Highlighted
Honored Contributor

## Re: expression

Ok so in this example my formula should work with a tweak, however how do you tell if it is > or< or = ?

=COUNT({<Division={"=Aggr(Sum({<METRIC=,COMPONENETID={'49'}>}COMPONENTVALUE)/Sum({<METRIC=,COMPONENETID={'50'}>}COMPONENTVALUE)*100,Division)={">\$(=minvalue)"}"}>}DISTINCT Division)

Highlighted
Contributor III

## Re: expression

in the field minvalue i have a string LIKE-

'>70'

Highlighted
Honored Contributor

## Re: expression

hmmmm OK.... let me set up some testing!