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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with expression

Hi,

Below is my expression:

=$(vLogFn($(=

sum({<[Report Date]={'>=$(vToDateMonthStart) <=$(vToDateMTD)'}>} [New Issuance Principal])

-

sum( {<[Report Date]={"$(=Date(Monthstart(Max({<Metric=,DateFlag={'2'}>}[Report Date]))))"},Metric={"Orig Loans/Advances ($M)"}>} [Forecast Value])*1000000*

num#(day(Max({<Metric=,DateFlag={'2'}>}[Report Date])))/num#(day(monthend(Max({<Metric=,DateFlag={'2'}>}[Report Date]))))

)))

This expression returns -2.28M

But I want to show it as (2.28M) when the result is negative.

So basically the requirement is to show the difference in brackets when its negative and to show it as is when its positive.

Can anyone please let me know what change I need to make in my expression to achieve the result.

I want to display the output in a text box.

Note: LogFn is defined as below

pick(floor(log10(fabs($1))/3)+1, num($1, '#,##0.'), num($1/1000, '###K'),num($1/1000000, '###M'),num($1/1000000000, '###B'))

Thank you in advance.

Regards,

Sachin

11 Replies
Not applicable
Author

Here it is:

vLogFn.jpgWorks_Fine.jpgIssue.jpg

sunny_talwar

Can you try breaking the second expression with the vLogFn() variable to break in parts and see which part isn't working. This is going to be iterative, but don't know another way of helping you here.