Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
David-Wong
Employee
Employee

Bar Chart - Text Color- Value on Data Points - Show Total

Hi,

Not sure if this is possible in anywhere or if this is a bug, but I was trying to find a way to have the 'Show Total On Top' text color different than the text color for 'Values Inside Segments' for a Stack bar chart.

Attached with my example qvw file.

Thank you.

David

Total and Segment Text color.png

1 Solution

Accepted Solutions
iventurini
Contributor II
Contributor II

Hi David, I have the same issue. I have publish this idea, please vote!

View solution in original post

5 Replies
qlikview979
Specialist
Specialist

Hi,

R U Expecting like this ?

color.png

adamdavi3s
Master
Master

Hi David,

No it isn't an error, just the way you have your formula.

Basically the formula controls both texts, there isn't any way to separate them unless you can figure out the formula.

This one will get you closer, but won't work where you only have the one Dim2 (Dim = C) as the total = the total for the dim, but you might be able to tweak it to fit sorry I don;t have time to look further!

IF(sum({<Dim2=>}Value) = sum(aggr(sum({<Dim2=>} Value),Dim)),Green(),IF(Dim2=Dim2, White(),Green()))

Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.

David-Wong
Employee
Employee
Author

Hi Adam,

Thank you for your suggestion.

I know what you mean and I did try to match the Sum( Aggr(Sum(Value), Dim))=sum(Value) to determine the color for the total, its working if my chart is a table with subtotal row.  As for bar chart, I am not sure if it is working the same way.  I might be still not able to get the formula right as per said, but if you can, do share your solution.  I have included the condition as per your suggestion (not exactly copying your formula but based on your concept).

I thought to try to create another expression to just have the Dim2 sum value and the first one for the Sum Total Value display using Show value and Text Color (The Total expression with Green, and the Dim2 Sum value as White), and the text color for the second expression does not seems to be working (QV ignore the text color setting for the second expression).

I also use rowno method - apparently the total value color always will be the same as the last row text color.  See my attached .qvw file.

Regards,

David

iventurini
Contributor II
Contributor II

Hi David, I have the same issue. I have publish this idea, please vote!

Anonymous
Not applicable

Hi David,

realize this thread is a bit old, but I have a workaround.

Add another expression with text color in black and 0 as expression. In case of a stacked bar chart it will always use the last expression color to show the total. In this case it will then turn to black. Make sure it is the last expression (demote it to the bottom).