Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
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

Tags (1)
1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: way to work this formula on Qlik Sense

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: way to work this formula on Qlik Sense

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

Highlighted
Not applicable

Re: way to work this formula on Qlik Sense

Thank you so much

It works!

Highlighted
Not applicable

Re: way to work this formula on Qlik Sense

Can you explain that function?

Highlighted
MVP & Luminary
MVP & Luminary

Re: way to work this formula on Qlik Sense

Which one?


talk is cheap, supply exceeds demand
Highlighted
Not applicable

Re: way to work this formula on Qlik Sense

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