Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator 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?

adi

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

Ok give this a crack

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

View solution in original post

12 Replies
Anil_Babu_Samineni

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)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
adamdavi3s
Master
Master

Hi Adi,

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)

adiarnon
Creator III
Creator III
Author

its not only 70 and its not always >

it can be <20

=15

if it was just the number it was easy

adamdavi3s
Master
Master

OK but how is this number derived?

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

adiarnon
Creator III
Creator III
Author

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

adamdavi3s
Master
Master

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)

adiarnon
Creator III
Creator III
Author

in the field minvalue i have a string LIKE-

'>70'

adamdavi3s
Master
Master

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