Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
fvarlet
Contributor II
Contributor II

Formatting the customized color scale of a barchart

Hi all,

I've created a barchart using a measure for its colors.

It works well.

I would like to display units too, in the color legend and in the measure (displayed when the mouse is over a bar).

I've tried using Num(measure), Money(measure) (as the unit is a monetary unit), and even Dual(), but these functions have no effect.

For example, with Dual():

=Dual(
      Avg(
          Aggr(Sum({<OLC_PipelineStatus={"Closed Won"}
                     , OLC_Status={'C03_Closed'}
                     , TotalVsWeighted={'Total amount'}
                   >} OLC_AmountPerProduct), OLC_OpportunityNumber, OLC_DateSnapshot)
         )
       &' k€'
      ,
      Avg(
          Aggr(Sum({<OLC_PipelineStatus={"Closed Won"}
                     , OLC_Status={'C03_Closed'}
                     , TotalVsWeighted={'Total amount'}
                   >} OLC_AmountPerProduct), OLC_OpportunityNumber, OLC_DateSnapshot)
         )
     )

The unit never appears.

Is there a way to display units with color scales?

 

Labels (3)
11 Replies
fvarlet
Contributor II
Contributor II
Author

Hi all,

Nobody has an idea how to do that?

Do I need an extension or is there a way to do it directly in Qlik Sense?

Thanks in advance for your help

fvarlet
Contributor II
Contributor II
Author

Hi all,

I don't know if my demand is cleared enough.

To explain it a bit better, here is a picture of what I need:

Color scale.png

 

 

 

 

Do you know how I can add the word " days" in the color scale and in the bubble?

Thanks in advance for your help

Anil_Babu_Samineni

Use like below for your measure.

Dual(Expression & ' Days', Expression)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
fvarlet
Contributor II
Contributor II
Author

It's exactly what I did.

As I said in my first message, I've also tried Num(), or Money() (when I need monetary units), but the unit never appears

Anil_Babu_Samineni

I just answer to your first part in Blue color where as Red color won't get like that as that will create integer based.

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rbartley
Specialist II
Specialist II

Hi,

 

You can display the units in the mouse-over by setting the Number format of the measure to custom and adding the units (in my case tonnes, in yours days) to the end of the format pattern.  This doesn't seem to work for the colour legend though.

 

Add units to measure.JPG

rbartley
Specialist II
Specialist II

Sorry, it appears that the custom formatting is removed when you select color by measure.

fvarlet
Contributor II
Contributor II
Author

Thank you for your feedback.

And how to do it when it's not a measure of the barchart, but the measure of the color scale?

@Anil_Babu_Samineni wrote:

I just answer to your first part in Blue color where as Red color won't get like that as that will create integer based.

Capture.PNG

 Even for the first part (your blue circle), I cannot display the unit

rbartley
Specialist II
Specialist II

That's the problem.  With all of the other options, no legend is displayed, but you can display the unit, but when you color by measure, you get the legend but not the unit.  I would say it's a design limitation and should be easy for Qlik to introduce in a future version (allow custom format of legend).  For the moment, I don't think it can be done, unless someone else has a solution.