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

Using set analysis where field = a different field

Hi all,

I currently have an expression in a chart that performs a sum for a selected KPI number. 

i.e. 

A user selects KPI 77, the chart then evaluates the expression relating to KPI 77. 

When the KPI is selected, all of the attributes of that KPI are also  displayed, what i am trying to achieve is if the user selects an attribute of KPI 77, i want another chart to display that shows the calculation of the attribute. 

So if the attribute KPI number is 21, then i want to expression to use 21 instead of 77. At the moment the chart looks at the field relating to the KPI number not the attribute KPI number.

The attributes are in a different table in the data structure. 

The expression is 

$(=only(Calculation))

The calculation field is all scripted. 

So what i want to do is to use set analysis in the expression to say something like $(=only({<KPI_ID=Attribute_ID>}Calculation))

 

Can anyone help please? 

2 Replies
Lisa_P
Employee
Employee

You could link the two tables using Attribute_ID as field in the same table as KPI Number.
Load ..
KPI_Number,
Subfield(KPI_Number, ' ', 2) as Attribute_ID,
...
This extracts the Number component from the KPI to put into the Attribute_ID field which should join the tables.

Brett_Bleess
Former Employee
Former Employee

Hey Chris, did Lisa's post help you get what you needed?  If so, please consider using the Accept as Solution button on her post to give her credit for the help.  If you are still struggling, provide an update on things, and if you did something else, if you can share that, you can mark that as the solution as well after you post it...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.