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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Aryasmank
Contributor III
Contributor III

Replace() function not working in Bar Chart

Hi,

I'm using a replace() in a bar chart , but its not working , giving result as "The chart is not displayed because it contains only undefined values."  but same expression is working fine in table.

Expression:  repalce(replace(replace(Interval(Final-initial, 'D@ hh# mm&'),'@','days'),'#','hours'),'&','Minutes')

I want to display the time difference a x days y hours z minutes in bar chart.

Please suggest any suggestion.

Thanks,

Mayank

Labels (2)
3 Replies
Or
MVP
MVP

Looks like you're replacing the underlying numeric value with a text interpretation of that value, but a bar chart needs numeric values, not strings, on its value axis. You'll have to keep the numeric value to get a result.

 

QFabian
MVP
MVP

Hi!, you can take that formula and put it in the script to create a new field for using as dimension.

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
Aryasmank
Contributor III
Contributor III
Author

Hi,

Thanks for response, but I need this as a measure not dimension.