Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression help wildcard or value selection

Hi Guys,

I'm not sure if this will make sense

In this expression, can i use a wildcard where it says Dorset or something else, i want the result of one area value at a time when i qlik it rather than just hard code in Dorset.

Thanks

SUM({<AREA={"Dorset"}>}[Value])

/

SUM(TOTAL{<AREA={"*"}>}[Value])

1 Solution

Accepted Solutions
sunny_talwar

You mean when you select than that Area's value should be in the numerator? May be try this:

Sum(Value)/Sum(TOTAL{<Area>} Value)

View solution in original post

2 Replies
sunny_talwar

You mean when you select than that Area's value should be in the numerator? May be try this:

Sum(Value)/Sum(TOTAL{<Area>} Value)

reddy-s
Master II
Master II

Hi Lak,

The expression Sunny mentioned would work for your requirement. If you want to explicitly enforce the condition for your selections use the p() and e() functions to achive this.

sum({$< Area = p({< Area = { $(=getfieldselections(Area)) } >}) >}Value) / Sum(TOTAL{<Area>} Value)

you can exclude your selections using the e() function

sum({$< Area = e({< Area = { $(=getfieldselections(Area)) } >}) >}Value) / Sum(TOTAL{<Area>} Value)