4 Replies Latest reply: Dec 3, 2014 12:21 PM by Christian Timm RSS

    Stacked Bar Chart - Can't get the Dual() function to work

      Hi,

       

      I've got a problem with getting some customized labels on my bars in a stacked bar chart.

       

      Through reading other posts, i've seen cases where people have used Dual(string,num) to provide a customized label for the bars in the chart.

       

      I have the following options enabled in the chart properties:

       

      • Expressions tab: Values on Data Points
      • Number tab: Format = Expression Default
      • Presentation tab: Plot Values Inside Segments

       

      What i'm doing is this: i have an expression set up with a dual(value+string, value) and i'm expecting to see the value+string inside each segment.

       

      The expression for the moment is:

       

      =Dual(if(Rev > Budget1, Budget1, Rev) & '(45%)',  if(Rev > Budget1, Budget1, Rev))

       

      No matter what i try, i can't get it to display the number and text - it always just displays an unformatted number. I've inserted an image of what i've tried below (with figures blacked out, but you can clearly see if doesn't end in "(45%)" ).

       

      Stacked Bars Dual.JPG

       

      I'm using Qlikview 11 SR 2. What am i doing wrong!?

       

      Any help you guys can provide is most appreciated.

       

      Cheers,

      Ben