Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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])
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;
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;
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
Hi,
Thanks for your reply. I'd like to know how you managed to combine the GrandTotal to the original stacked bar chart? Could you share your expression? Thank you.
Hi,
load editor below:
CostCentre:
LOAD * INLINE [
CostCentre,Area,Group
'10','Corporate Services','Corp-Support'
'11','Corporate Services','Corp-Support'
……..
'77','Projects','Corp-Support'
'510','EAS','EAS'
];
Concatenate(CostCentre)
Load CostCentre,Area,'TOTAL' as Group Resident CostCentre;
Then, in the chart itself:
And measure expression below:
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])