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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mdubyk
Contributor II
Contributor II

When filtered, bar chart does not round all the bar values

When using a filter (date) on a bar chart I receive a decimal value instead of the rounded number. The formula I am using is: "=round(Num(Sum({<[Type 2]-={'CAP'},[OET Sort]-={'-'}>}[USD Notional- Final])))/1000000" where the bar chart should return the rounded sum of USD Notional - Final where Type 2 does not equal CAP and OET Sort is not blank. However, as the attached screenshot shows, I often receive unrounded values with several decimal places. 

Labels (1)
2 Solutions

Accepted Solutions
Clement15
Partner - Specialist
Partner - Specialist

Hello,

 

Try this : 

round(Num(Sum({<[Type 2]-={'CAP'},[OET Sort]-={'-'}>}[USD Notional- Final]))/1000000)

View solution in original post

marcus_sommer

num() must be the most outer function of an expression to ensuring the working. Means something like:

Num(round(Sum({<[Type 2]-={'CAP'},[OET Sort]-={'-'}>}[USD Notional- Final])/1000000))

View solution in original post

5 Replies
Clement15
Partner - Specialist
Partner - Specialist

Hello,

 

Try this : 

round(Num(Sum({<[Type 2]-={'CAP'},[OET Sort]-={'-'}>}[USD Notional- Final]))/1000000)

mdubyk
Contributor II
Contributor II
Author

Hi Clement,

Thank you for your help! This is definitely better as it removes the decimal error but it seems like the format pattern still does not carry over to all cells unless I refresh the page (see screenshot with highlighted cells showing correct format). 

Do you have any insights on why this is? 

Clement15
Partner - Specialist
Partner - Specialist

Hello,
I'm sorry, I don't think I understood correctly regarding the current problem. Can you explain again?

marcus_sommer

num() must be the most outer function of an expression to ensuring the working. Means something like:

Num(round(Sum({<[Type 2]-={'CAP'},[OET Sort]-={'-'}>}[USD Notional- Final])/1000000))

mdubyk
Contributor II
Contributor II
Author

No worries, I figured it out. Thanks for the help!