Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
Creator
Creator

How to Show grand total as bar in Bar Chart ?

Hi All,

I am having the scenario like , Need to include Grand total as bar in the same bar chart on top.

Data :

      Product, Sales

    Product A, 100

    Product B, 200

    Product C, 300

    Product D, 400

Barchart.png

Note : I want to Display 'Grand Total as 1000' in my Bar chart, on top of the chart

Any suggestions ?

Regards,

Madhu

1 Solution

Accepted Solutions
sunny_talwar

Try this

Create a new field in the script

Load * Inline [

Dim

1

2

];

and then try this

Dimension

Pick(Dim, Product, 'Total')

Expression

Sum(Sales)

Sort tab, use this expression

Only({1} Dim) and then sort this in descending order

also make sure that sort by text is also checked

uncheck everything else

View solution in original post

9 Replies
sunny_talwar

Did you tried to check 'Total' on the Dimension limits tab?

prma7799
Master III
Master III

Go to Presentation >> Text in chart >> add your expression .

On your need you can place this at anywhere in your chart

madhubabum
Creator
Creator
Author

Yes, But no luck

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Madhu,

Please  check below heck box: as Suggested by sunny

Show Total.png

Thanks,

Arvind Patil

sunny_talwar

Would you be able to share a sample where you are trying this?

madhubabum
Creator
Creator
Author

Hi Arvind,

Thanks for Help..

Here i am getting the Grand total in the bellow chart, But i want to show Grand total on top of the bar

Barchart1.png

sunny_talwar

Try this

Create a new field in the script

Load * Inline [

Dim

1

2

];

and then try this

Dimension

Pick(Dim, Product, 'Total')

Expression

Sum(Sales)

Sort tab, use this expression

Only({1} Dim) and then sort this in descending order

also make sure that sort by text is also checked

uncheck everything else

madhubabum
Creator
Creator
Author

Thanks Sunny ,

Working perfect

SteveInVT
Contributor
Contributor

Thank you so much, @sunny_talwar .  This post helped me solve 3 different issues that I was having!  I had no idea the Pick function could be used this way.  Thanks again!