Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

LY net profit -ve and CY +ve How to make the % column display as +ve % ?

Hi All

I have below expression work fine for last 8 yr :-

=if((column(1)+column(2))=0,0,(if(fabs(column(1))=0,1,column(2) / column(1)-1)))

Now i need to measure net profit , when LY value can be -ve and CY value can be +ve i start to encounter issue.

it is possible to make display of -278% change to +278% ?

Paul

17 Replies
PrashantSangle

How many expression do you have???

Can you post your expression??

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
paulyeo11
Master
Master
Author

enclosed my QV Doc , you can see the expression there

PrashantSangle

Sorry bro dont have qlikview install in my machine.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
paulyeo11
Master
Master
Author

Hi max

you are QV expert why you not having QV ?

basically my eXP all in -ve value , and my net profit if gain +ve value if lost -ve.

% expression as below :-

=if((column(1)+column(2))=0,0,(if(fabs(column(1))=0,1,column(2) / column(1)-1)))

i have issue on net profit % not display correctly, after change the expression below , net profit work fine :-

(column(2)-column(1)) / Fabs(column(1))

Now my eXP not working fine. for example LY exp -200k and CY exp -100K it display as +ve , it should be -ve.

Paul

PrashantSangle

Hi,

Since past 6 month I am not working on qlikview. I am working on another technology.

Get back to your requirement just tell me what is eXP??

It is fieldValue or expression??

You can add one more if in your expression.

try something like

if(not match(columnName,'eXP'),(column(2)-column(1)) / Fabs(column(1)),column(2) / column(1)-1)

Check bracket closing might missed.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tamilarasu
Champion
Champion

Hi apul,

Can you confirm whether the YTD variance % values are correct.? Do you want to change only the negative and positive sign alone.?

paulyeo11
Master
Master
Author

Hi Tamil

For the first step I want to focus on Sign only. As this is more impt now.

Paul

tamilarasu
Champion
Champion

Fine. I have attached a updated file.