Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Cameron-R
Contributor II
Contributor II

Using a Button to Filter a Calculated Dimension

I'm looking to use a button to filter a calculated dimension in my table visualization. I have two data sources with multiple fields to be measured against one another. I'm attempting to join separate loads for the specific fields in the tables. 

TEMP:

Load

Name,

Funded_Hours

Resident Table1;

JOIN (TEMP):

Load

Name,

Planned_Hours,

Adjusted_Hours

Resident Table2;

FILTER:

Load

If(Sum(Planned_Hours + Adjusted_Hours) = Funded_Hours, 'Fully Funded') as FULLY_FUNDED

Resident Temp; Drop Temp;

 

The goal is to use a button to 'Select values in a field'. Field being FULLY_FUNDED and 'Fully Funded' being the value selected. When I run the load editor it doesn't return any errors, but my button does not make the desired selections. Any suggestions or alternatives to accomplish this task would be appreciated!

1 Solution

Accepted Solutions
Rohan
Specialist
Specialist

Hi @Cameron-R ,

While using Sum you should also specify the level of aggregation, in this case i assume you will be checking the sum of hours at the Name level. So you should add Name also to the 2nd table.

FILTER:

Load

NAME,

If(Sum(Planned_Hours + Adjusted_Hours) = Funded_Hours, 'Fully Funded') as FULLY_FUNDED

Resident Temp Group by NAME; Drop Temp;

Also, I quick way to check if this is correct is to simply add FULLY_FUNDED to a Straight table as a dimension & see if you are getting the expected values in it or not.

 

Regards,

Rohan.

 

 

View solution in original post

3 Replies
pravinboniface
Creator II
Creator II

@Cameron-R One problem is there is no association between your FILTER table and Table1 and Table2.  Please see if adding Name in FILTER helps as below:

 

FILTER:

Load

Name,

If(Sum(Planned_Hours + Adjusted_Hours) = Funded_Hours, 'Fully Funded') as FULLY_FUNDED

Resident Temp; Drop Temp;

Rohan
Specialist
Specialist

Hi @Cameron-R ,

While using Sum you should also specify the level of aggregation, in this case i assume you will be checking the sum of hours at the Name level. So you should add Name also to the 2nd table.

FILTER:

Load

NAME,

If(Sum(Planned_Hours + Adjusted_Hours) = Funded_Hours, 'Fully Funded') as FULLY_FUNDED

Resident Temp Group by NAME; Drop Temp;

Also, I quick way to check if this is correct is to simply add FULLY_FUNDED to a Straight table as a dimension & see if you are getting the expected values in it or not.

 

Regards,

Rohan.

 

 

Cameron-R
Contributor II
Contributor II
Author

Thanks @Rohan & @pravinboniface . I was able to get a solution that worked based on your suggestions. Turns out I had a second key to associate so the Group By function to specify level of aggregation was clutch.