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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

EXPRESSION IN FIELD

hi

i have a field that contain an expression

i added in the end a sample of my table

in my UI i have a screen that i must choose one metric

and in this screen i want to create a chart that the expression of the chart will be the exp field

how can i do it?

is there a way of doing that without a variable?

adi

metricexp

1

sum(amount)
2avg(amount)
3min(amount)

x

cccccccc

Labels (1)
3 Replies
Anil_Babu_Samineni
MVP
MVP

how many metric values you have? change accordingly as you required.

Take Straight Table

ValueLoop(1,3) -- Give name as metric

Expression may be using this

If(ValueLoop(1,3)=1, Sum(amount), If(ValueLoop(1,3)=2, Avg(amount), If(ValueLoop(1,3)=3, Min(amount))))


Or


Pick(Match(ValueLoop(1,3),1,2,3), Sum(amount), avg(amount), min(amount))

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
adiarnon
Creator III
Creator III
Author

hi. but for this solution i dont need the expression in the field...

the idea is that the expression is dymanic and extract from a table.

adi

muthukumar77
Partner - Creator III
Partner - Creator III

May be like this,

Muthukumar Pandiyan