Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ajipaul03
Contributor III
Contributor III

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
Kushal_Chawda

@ajipaul03  try below

 

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

View solution in original post

3 Replies
Taoufiq_Zarra

@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") 😉
Kushal_Chawda

@ajipaul03  try below

 

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

Thank you Taoufiq  and Kush