Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to implement the following logic inside a measure:
If (DATE_ID >=1465 or DATE_ID <=1556) then Sum( Field1- (Field 2+Field 4)/ Sum(Field 3)
I tried using an expression : Sum({<DATE_ID ={">=1465"}>} {<DATE_ID ={"<=1556"}>} (Sum( Field1- (field 2+Field 4)/ Sum(Field 3)))
The expression doesn't work.probably because it has multiple operators.
Please suggest a solution.
Thanks
Just a minor change:
Sum({<DATE_ID ={">=1465<=1556"}>} Field1- (field 2+Field 4)/ Sum(Field 3))
Hi Soumya,
I think you just have a minor syntax issue. Try this:
Sum({<DATE_ID ={">=1465"}>}, DATE_ID ={"<=1556"}>} Field1- (field 2+Field 4)/ Sum(Field 3))
-Josh
Qlik
Please mark my response as helpful or correct so other member can find answers more quickly.
Just a minor change:
Sum({<DATE_ID ={">=1465<=1556"}>} Field1- (field 2+Field 4)/ Sum(Field 3))
Thanks Ruben. I missed that!
-Josh
I tried using this expression: Sum({<DATE_ID ={">=1465<=1556"}>} Field1- (field 2+Field 4)/ Sum(Field 3))
When I use the Sum function inside expression 'Sum(Field3)'. It says expression is wrong. And If I leave the 'Sum' function out, there's no error but the division part is not working in the calculation.
Try this:
Sum({<DATE_ID ={">=1465<=1556"}>} Field1- (field 2+Field 4)/ Field 3)
-Josh
Qlik
This function checks:
if(DATE_ID >=1465,if(DATE_ID <=1556,sum( Field1- (Field 2+Field 4)/ Sum(Field 3)))
Thank you all. I used the expression to create a variable. It's working.
Maybe one of these:
Sum({<DATE_ID ={">=1465<=1556"}>} Field1- (field 2+Field 4))/ Sum({<DATE_ID ={">=1465<=1556"}>} Field 3))
Sum({<DATE_ID ={">=1465<=1556"}>} (Field1- (field 2+Field 4))/ Field 3)
If your question is answered, please flag correct and helpful answer(s).