Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

How to put text and expression value both in the bar chart

Hi,

I have bar chart , that has only expressions . I want to show text and expression value in my bar chart's data point.

The output should be like this image below;

in the bar chart expression in wrote the following code:

=Dual(my text,' ,sum(Test) .

I am only getting the value for sum(Test) . I want both 'my text' as well as sum(Test) in the chart .

Currently I am getting like this:

Thank you,

Ashis

1 Solution

Accepted Solutions
mtucholski
Creator
Creator

Hi,

change the number formating of the expression to default. If you want, you need to format your number in an expression:

dual('TEXT: '&num(sum(CONSUMO_TOT_ANNUO),'###########.###'),sum(CONSUMO_TOT_ANNUO))

View solution in original post

10 Replies
pooja_prabhu_n
Creator III
Creator III

Hi,

If possible can you share sample app.

Thanks,

Pooja

tresesco
MVP
MVP

One way could be like in attached sample.

Capture.JPG

mtucholski
Creator
Creator

Hello,

According to Qlik Help, you can give a number different formatting but not both at a time. I have a solution for you - don't know if you will like it though. Check it out.

Also take a look at this straight table and compare the expression formating in number tab.

In QlikView, all field values are potentially dual values. This means that the field values can have both a numeric value and a textual value. An example is a date that could have a numeric value of 40908 and the textual representation ‘2011-12-31’.

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/FormattingFunc...

tresesco
MVP
MVP

Or, if you meant to see both text and number together, try like:

=Dual( 'my text  : '  & sum(Test), sum(Test))


Capture.JPG

ashis
Creator III
Creator III
Author

Hi Tresesco,

I am using bar chart.

I tried your above expression =Dual( 'my text  : '  & sum(Test), sum(Test))

However this does not give desire output. Only giving expression value in the data point .

Please not I do not have any dimension in the bar chart.

It is very simple chart though .

mtucholski
Creator
Creator

Hi,

change the number formating of the expression to default. If you want, you need to format your number in an expression:

dual('TEXT: '&num(sum(CONSUMO_TOT_ANNUO),'###########.###'),sum(CONSUMO_TOT_ANNUO))

ashis
Creator III
Creator III
Author

Hi Mateusz ,

Thank you for your reply.

As I said , it is bar chart without dimensions. it has only expression.

Only I want to show text value as well as expression value in the chart , just as value on data point.

Not sure if this is possible.

Thank you for your reply though.

ashis
Creator III
Creator III
Author

Thanks Mateusz, this solution works for me.

I have one problem if my text is bigger then it does not appear in the bar , is there a way to adjust the text inside the bar length.

Thank you,

mtucholski
Creator
Creator

Add ='<H6>' in text format of the expression and maybe another line between text and number? Like that:

dual('TEXT:

'&num(sum(CONSUMO_TOT_ANNUO),'###########.###'),sum(CONSUMO_TOT_ANNUO))