Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
guster999
Creator
Creator

TOTAL bar needed on a stacked bar chart

Hi - I have a stacked bar chart as below and wish to add a bar for overall at the top(combining the results from my 'Group' dimension).  Please how do I create this in the chart, or within dimension load given the setup below?

thankyou🙂

Gus

guster999_0-1668120808546.png

My 'Group' dimension is created from inline as per below sample:

CostCentre:
LOAD * INLINE [
CostCentre,Area,Group
'10','Corporate Services','Corp-Support'
'11','Corporate Services','Corp-Support'
'12','Marketing','Corp-Support'
'13','Corporate Services','Corp-Support'

which joins via CostCentre to my main table load.

My 2 DIMs for chart are Group and length of service, and my measurement is:

Count({<[Employee Status Description]-={'Board','Casual','Volunteer'},[Termination Date]={""}>}distinct [Employee Name])
/
Count({<[Employee Status Description]-={'Board','Casual','Volunteer'},[Termination Date]={""}>} TOTAL <Group> distinct [Employee Name])

Labels (1)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Duplicate the rows for each group under TOTAL

CostCentre:
LOAD * INLINE [
CostCentre,Area,Group
'10','Corporate Services','Corp-Support'
'11','Corporate Services','Corp-Support'
'12','Marketing','Corp-Support'
'13','Corporate Services','Corp-Support'

];

Concatenate(CostCentre)

Load CostCentre,Area,'TOTAL' as Group Resident CostCentre;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

Duplicate the rows for each group under TOTAL

CostCentre:
LOAD * INLINE [
CostCentre,Area,Group
'10','Corporate Services','Corp-Support'
'11','Corporate Services','Corp-Support'
'12','Marketing','Corp-Support'
'13','Corporate Services','Corp-Support'

];

Concatenate(CostCentre)

Load CostCentre,Area,'TOTAL' as Group Resident CostCentre;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
guster999
Creator
Creator
Author

thanks so much Vineeth, that works a treat.😎

I had noted I'm getting 101% for the stack for just the TOTAL bar (I assume due to rounding), is there an easy fix for that without impacting the other bars?

thanks

guster999_0-1668138318425.png