Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Last year lost -9.6K Current year lost -2.3 K now display -76% , how to make it display +76 % ?

Hi All


My below expression working fine for last 6 year with out any issue :-


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


Recently when i use the same expression for compare net profit amount ,  when Last year lost -9.6K Current year lost -2.3 K now display -76% , how to make it display +76 % ?


76 percent.png


Hope some one can advise me.


Paul Yeo

8 Replies
paulyeo11
Master
Master
Author

My QVW

MK_QSL
MVP
MVP

May be

IF(Column(1) + Column(2) = 0,0,

IF(Fabs(Column(1))=0,1,

1-(Column(2)/Column(1))

))

uacg0009
Partner - Specialist
Partner - Specialist

Hi Paul,

Please see the attachment, hope that's what you want.

By the way, your macro is cool~

Thread 297471.PNG

Thread 297471_2.PNG

Thanks.

Aiolos

paulyeo11
Master
Master
Author

Hi Zhao

Thank you very much for your sharing , it work fine.

From your name and your photo , i think you are from china right ?

Paul Yeo

uacg0009
Partner - Specialist
Partner - Specialist

Hi Paul,

You are welcome, it's glad that I can help you.

And yes, I'm from China, are you in China or any connection with China?

Aiolos

paulyeo11
Master
Master
Author

Hi Zhao

I am from Singapore. I am Chinese like you. Can speak mandarin language , but most of the time we speak English language. Last year I do visit china few times robotics for business.    

My grand mother are from china. and i think during world war 2 they move to Indonesia then move to Singapore ( I think i need to ask my mother ).

Paul

uacg0009
Partner - Specialist
Partner - Specialist

Hi Paul,

Oh, robotics, that sounds cool. And it's a little surprised me when you say WW2. It's first time I say somethings not about Qlik in the Community.

I'm in Shanghai, I don't know whether you have came or not. Actually I plan this year to go to Singapore, maybe after September I think.

I don't know whether you know that in China everyone use wechat, but I don't know in Singapore, what app you use?

Line? what's app?

Aiolos

paulyeo11
Master
Master
Author

Hi Zhao

I see , pls contact me when you in Singapore. I think not suppose to chat in this forum. You can email me at paulyeo@tdstech.com.

Paul Yeo