Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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
Specialist III
Specialist III

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

QFabian
Aryasmank
Contributor III
Contributor III
Author

Hi,

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