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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Why i cannot divide by Rate in my GP% Expression ?

Hi All

I have below expression it alway display 0 % when i select SOURCE = TDSID :-

(

sum({$<YTD = {'-1'} , rEVENUE={rEVENUE}>}Amount)/Rate

-

sum({$<LY_YTD = {'-1'} , rEVENUE={rEVENUE}>}Amount)/Rate

)

/

sum({$<LY_YTD = {'-1'} , rEVENUE={rEVENUE}>}Amount)/Rate



After i remove the /Rate as below , And it work fine :-


(

sum({$<YTD = {'-1'} , rEVENUE={rEVENUE}>}Amount)

-

sum({$<LY_YTD = {'-1'} , rEVENUE={rEVENUE}>}Amount)

)

/

sum({$<LY_YTD = {'-1'} , rEVENUE={rEVENUE}>}Amount)


My question is why i need to remove /Rate to make it work ? as logically it is a constants , so it should not affect the result. but it does .


Paul

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

And if you put the RATE inside the Sum?

sum({$<YTD = {'-1'} , rEVENUE={rEVENUE}>} Amount/Rate)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
paulyeo11
Master
Master
Author

Hi All

My QVF Doc

jonathandienst
Partner - Champion III
Partner - Champion III

And if you put the RATE inside the Sum?

sum({$<YTD = {'-1'} , rEVENUE={rEVENUE}>} Amount/Rate)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
paulyeo11
Master
Master
Author

Hi Sir

If what you said is correct , the error due to rate must place inside the sum.

Why I only get 0% when source = TDSID ?

Paul

Sent from my iPhone