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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Nagaraju_KCS
Specialist III
Specialist III

Value convert to Billion/Million etc

Hi Community,

I have converted values into Billions, but facing issue with restrict selection and negative values.

I did manage with below variables, but negative values (for negative values - couldn't manage with dual function also)

SET vSize = Div(Log10($1),3);
SET vFormatNumber = Dual(Num($1/Pow(10,3*$(vSize($1))),'$ #,##0.0')&' '&Pick($(vSize($1)),'K','Mil','Bil','Tril'),$1);

below are two chart 1st chart showing values working fine

second one converted to billons/Millions, but not working properly (Exclude month and negative values are not working)

qv_testing_0-1630297755887.png

Thanks in Advance!

1 Solution

Accepted Solutions
Nagaraju_KCS
Specialist III
Specialist III
Author

Managed with this ....

dual(num(sum(Value)/pow(10,3*floor(log10(sum(Value))/3)),'$ #,###.#'&pick(floor(log10(sum(Value))/3),' ts', ' mn' , 'bn')),sum(Value))

View solution in original post

2 Replies
Nagaraju_KCS
Specialist III
Specialist III
Author

I did manage with negative values using fabs.

SET vSize = Div(Log10(fabs($1)),3);

anyone can help me on exclude month ? (in set analysis Month= is not working)

any other way work around ?

 

 

Nagaraju_KCS
Specialist III
Specialist III
Author

Managed with this ....

dual(num(sum(Value)/pow(10,3*floor(log10(sum(Value))/3)),'$ #,###.#'&pick(floor(log10(sum(Value))/3),' ts', ' mn' , 'bn')),sum(Value))