Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

way to work this formula on Qlik Sense

Try to use this formula below, but Qlik Sense doesn't allow me to do so..

Can someone edit this to work on the Qlik S please?

Thank you

if(isnull([SHIP_DT]=False and isnull([P_RETURN_DT])=False)) then

(sum([SALE_RPRICE])*([ORDER_QTY]))*(-1)

elseif (isnull([SHIP_DT])=False and isnull([P_RETURN_DT])=True) then

(sum([SALE_RPRICE])*([ORDER_QTY]))

else

0

END

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps like this: sum({<SHIP_DT={'*'}>}SALE_RPRICE*ORDER_QTY) * If(IsNull(P_RETURN_DT),1,-1)

If P_RETURN_DT is a date field, i.e. a number too, then you could try

sum({<SHIP_DT={'*'}>}SALE_RPRICE*ORDER_QTY) * -Alt(P_RETURN_D/P_RETURN_D,-1)


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps like this: sum({<SHIP_DT={'*'}>}SALE_RPRICE*ORDER_QTY) * If(IsNull(P_RETURN_DT),1,-1)

If P_RETURN_DT is a date field, i.e. a number too, then you could try

sum({<SHIP_DT={'*'}>}SALE_RPRICE*ORDER_QTY) * -Alt(P_RETURN_D/P_RETURN_D,-1)


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you so much

It works!

Not applicable
Author

Can you explain that function?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Which one?


talk is cheap, supply exceeds demand
Not applicable
Author

Can you fix these two formulas?

1 -

IF [P_RETURN_DT]=[date] and ISNULL([P_RETURN_DT])=FALSE then

[ORDER_QTY]*[SALE_RPRICE]*-1

ELSE

0

END

2 -

IF [SHIP_DT]=[date] and ISNULL([SHIP_DT])=FALSE then

[ORDER_QTY]*[SALE_RPRICE]

ELSE

0

END