Qlik Community

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 
Search instead for 
Did you mean: 
Highlighted
Contributor II
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_CATOPTIONAMT
R&MR&M-$100
CostA-$200
CostA-$50
CostB-$400
CostC-$600
RevenueA$250
RevenueB$300
RevenueB$450
RevenueC$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_CATTotal
R&M-$100
Cost-$250
Revenue$250

 

 

OPTION-B Selection

VALUE_CATTotal
R&M-$100
Cost-$400
Revenue$750

 

Can someone please help?

 

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)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

@ajipaul03  try below

 

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

View solution in original post

3 Replies
Highlighted
Master
Master

@ajipaul03  One solution:

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

output:

A selected

Capture.PNG

B selected

Capture.PNG

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
MVP

@ajipaul03  try below

 

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

View solution in original post

Highlighted
Contributor II
Contributor II

Thank you Taoufiq  and Kush