Skip to main content
Announcements
See why Qlik was named a Leader in the 2025 Gartner® Magic Quadrant™ for Augmented Data Quality Solutions: GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
streetyhk
Contributor II

Adding a column that is a subset of data in another column

I have a table where one column is

Avg({<PeriodDateName=>}DurationOfStay)

I'd like to add another column which shows the above calculation but applied against those records where the value for Field 'WithSpecialNeeds' = 1.

What is the best way to do this.   I can create a filter where I can Choose 'WithSpecialNeeds' = 1 or 0 but ideally i"d like to see the columns next to each other so that I can see side by side the difference in stay duration when a case has special needs vs the average across all records for that selected time period.

 

Hope that makes sense!  Thank you.

Labels (2)
1 Solution

Accepted Solutions
Gabbar
Specialist

try this:
Avg({<WithSpecialNeeds={'1'},PeriodDateName=>}DurationOfStay)

View solution in original post

2 Replies
Gabbar
Specialist

try this:
Avg({<WithSpecialNeeds={'1'},PeriodDateName=>}DurationOfStay)

streetyhk
Contributor II
Author

Thank you that works perfectly.  I had tried similar but hadn't quite got the formatting correct.