Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

total of 2 sum expressions

Hello all.,

 

I want to achieve this logic : total of low cost country/ total of hours

How should i calculate Total of both the sum

low cost country= 

RangeSum(Sum({$<[PAMS.LowCostCountryFlag]={1}, [PAMS.Currentmonthstart] = {"<=$(=Max(Today()))"}>} PAMS.new_Actual) ,

Sum({$< [PAMS.LowCostCountryFlag]={1},[PAMS.Currentmonthstart] = {">=$(=Max(Today()))"}>} [PAMS.New_RB])
)*100

 

Similarly for total hours- how should i take the total of both the sum . 

Hours is calculated as :-

RangeSum(Sum({$< [PAMS.Currentmonthstart] = {"<=$(=Max(Today()))"}>} PAMS.new_Actual) ,

Sum({$< [PAMS.Currentmonthstart] = {">=$(=Max(Today()))"}>} [PAMS.New_RB])

 

Please help.

 

Thanks

4 Replies
Aspiring_Developer
Creator III
Creator III
Author

Can anyone please help me on this ?

I have calculated below for Hours:-

RangeSum(Sum({$< [PAMS.Currentmonthstart] = {"<=$(=Max(Today()))"}>} PAMS.new_Actual) ,

Sum({$< [PAMS.Currentmonthstart] = {">=$(=Max(Today()))"}>} [PAMS.New_RB])

 

I want to take TOTAL (Hours)- Hours is the above expression, How should i calculate the total .Please help

@Kushal_Chawda @sunny_talwar 

sunny_talwar

I think you might be missing a closing parenthesis

RangeSum(
  Sum({$<[PAMS.Currentmonthstart] = {"<=$(=Max(Today()))"}>} PAMS.new_Actual),
  Sum({$<[PAMS.Currentmonthstart] = {">=$(=Max(Today()))"}>} [PAMS.New_RB])
)
Aspiring_Developer
Creator III
Creator III
Author

@sunny_talwar  my expression is working fine. I want to take total of this whole expression like :-

Total (rangesum ..... expression ) 

We cannot use rangesum with total so how can I achieve this. I want to calculate total of this whole expression. 

sunny_talwar

May be this

RangeSum(
  Sum(TOTAL {$<[PAMS.Currentmonthstart] = {"<=$(=Max(Today()))"}>} PAMS.new_Actual),
  Sum(TOTAL {$<[PAMS.Currentmonthstart] = {">=$(=Max(Today()))"}>} [PAMS.New_RB])
)