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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

Expression

hi,

i have this expression-

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


and i have a varialbe

v_formula=Sum({<METRIC=,COMPONENETID={'49''>}COMPONENTVALUE)/Sum({<METRIC=,COMPONENETID={'50'}>}COMPONENTVALUE)*100


i need to to use the expression but to replace the expression in the aggr with the variable.


i have a problem with all the ' and "...


how can i do it?


adi

4 Replies
marcus_sommer

Try this:

COUNT({<Division={"=Aggr($(v_formula)&'Metric_Red&'"}>}DISTINCT Division)

- Marcus

Anonymous
Not applicable

just a question:

why is =aggr(..., Division) needed?

I think we're anyway within dimension "Division" or am I wrong?



found the answer --> nested aggregation

adiarnon
Creator III
Creator III
Author

tnx' but i have in the begining - =$(='

so i have a problem with the '

adi

marcus_sommer

Maybe this one:

COUNT({<Division={"=chr(39) & Aggr($(v_formula),Division) &'Metric_Red&' & chr(39)"}>}DISTINCT Division)

- Marcus