
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Represent Total bar in bar chart
Can anyone help me how to show total bar(Sum of all other bars) at the end in bar chart.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concatenate a hardcoded flag 'Total' to your fact table dimension which you are using in your bar chart.
In frontend expression use if() condition : if(Dimension='Total' , sum(total measure) , sum(measure))
Eg:
test:
load * inline
[
month,sales
Jan,10
Feb,20
Mar,30
];
concatenate (test)
TotalTable:
load * inline
[
month
Total
];
Frontend expression:
if(month='Total' , sum(total sales) , sum(sales))
Regards,
Aditya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Aditya,
But my requirement is like this
I want to show the right chart data in first chart and in filter I have to select months.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@V_Gautam_Raju I can't clearly understand your requirement just by looking at the screenshot. As mentioned by you earlier, you wanted total bar which sums up all other bars.
Do you want monthwise bar chart or Category wise bar with sum total shown as month ?
Regards,
Aditya


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That looks like an entirely different chart, with a different Y axis scale. If that's what you're after, just create two separate charts. If you were to add a total to the existing chart, typically this makes the component bars too small to be useful, so I'd recommend against that approach in most cases.
Note that you can also add a total to a chart using chart level scripting - https://community.qlik.com/t5/New-to-Qlik-Sense/Chart-Level-Scripting-Use-Case/td-p/1973024

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aditya,
I want category wise total

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the late reply. If you want category wise total, you can use the same method mentioned my me earlier. Just concatenate a total flag in the script to your fact table containing Category field and use provided measure expression in your bar chart measure.
Regards,
Aditya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aditya,
I want category wise bar with sum total shown as month.
