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

How to calculate a value using a calculated row in Qlik sense

Hi expert,

I have a project need to calculate a measure by subject and visit dates. It uses the sum of the first visit as a reference and the formula is -(The sum of following visit dates - the sum of the first visit)/the sum of the first visit. I also need to know the best measure for each subject - the lowest , and would like to know how many subject's measure is <-10% as KPI. I would like to know whether it can be done in Qlik sense. 

Please refer to one screen shot and the qvf file.

Thanks.

 

Labels (2)
1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi 

try this 

 

(
Sum(TR1ORRES) - aggr(nodistinct Sum({<TR1VISIT={'C1D1'}>}TR1ORRES),Subject)
)
/
aggr(nodistinct Sum({<TR1VISIT={'C1D1'}>}TR1ORRES),Subject)

View solution in original post

4 Replies
brunobertels
Master
Master

hi 

may be like this 

 

mesure =

(sum(TR1ORRES)-above(sum(TR1ORRES),rowno()-1))
/
above(sum(TR1ORRES),rowno()-1)

 

brunobertels_0-1660736678469.png

 

regards

bruno

jacobiopharma
Contributor II
Contributor II
Author

Hi Bruno,

Thank you for your helps. It works but the measure changes after other column is sorted. Is there any way I can disable sorting or find another solution? 

Thanks

JacobioMeasureChangedAfterSorting.png

brunobertels
Master
Master

Hi 

try this 

 

(
Sum(TR1ORRES) - aggr(nodistinct Sum({<TR1VISIT={'C1D1'}>}TR1ORRES),Subject)
)
/
aggr(nodistinct Sum({<TR1VISIT={'C1D1'}>}TR1ORRES),Subject)

jacobiopharma
Contributor II
Contributor II
Author

Really appreciate your helps. Thank you again!