# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Contributor II

## Set Analysis/ Expression :How to include a value irrespective of the selection ?

Hi Experts ,

I have a unique requirement to do certain analysis.

Here is the table structure

 VALUE_CAT OPTION AMT R&M R&M -\$100 Cost A -\$200 Cost A -\$50 Cost B -\$400 Cost C -\$600 Revenue A \$250 Revenue B \$300 Revenue B \$450 Revenue C \$650

I need to write an expression Sum({\$<......>}AMT), so that when user makes a selection in the option field, it should  always  include 'R&M'  VALUE_CAT.

ex.

OPTION A selection

 VALUE_CAT Total R&M -\$100 Cost -\$250 Revenue \$250

OPTION-B Selection

 VALUE_CAT Total R&M -\$100 Cost -\$400 Revenue \$750

I thought of duplicating the R&M for A,B and C OPTIONs  but I thought some experts would be able to guide me 🙂

Thanks,

Aji

Labels (1)
• ### Set Analysis Expression

1 Solution

Accepted Solutions
Highlighted
MVP

@ajipaul03  try below

``=sum({<OPTION,VALUE_CAT={'R&M'}>+<VALUE_CAT={"*"}>}AMT)``
3 Replies
Highlighted
Master

@ajipaul03  One solution:

``=sum({1<VALUE_CAT={'R&M'}>}AMT)+sum({\$<VALUE_CAT={"*"}-{'R&M'}>} AMT)``

output:

A selected

B selected

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Highlighted
MVP

@ajipaul03  try below

``=sum({<OPTION,VALUE_CAT={'R&M'}>+<VALUE_CAT={"*"}>}AMT)``
Highlighted
Contributor II

Thank you Taoufiq  and Kush