Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

lakwinder
Contributor III

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
MVP
MVP

Re: Expression help wildcard or value selection

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)

2 Replies
MVP
MVP

Re: Expression help wildcard or value selection

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)

reddys310
Honored Contributor II

Re: Expression help wildcard or value selection

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)