24 Replies Latest reply: Aug 26, 2016 11:32 AM by Ishan Bansal

# 100% stack bar chart

Hi All,

I am working on creating 100 % stack bar chart.

i have selected dimensions as week and category

category includes

IF (Aggr(Sum(AMOUNT_CLIENT), [CLIENT],[YEAR],[WEEK]) < 10, 'Spender 1')

this if conditions different types of spenders.

my measure has count(distinct client)

value wise data is displayed fine but i want to convert the value into % (100 % stack bar chart)

can some one pls suggest .

• ###### Re: 100% stack bar chart

May be try an expression like this:

Count(DISTINCT client)/Count(DISTINCT TOTAL <WEEK> client)

• ###### Re: 100% stack bar chart

hi,

Thanks for your support. But when i tried this i am getting 400%.

• ###### Re: 100% stack bar chart

You have Week as your first dimension, right?

• ###### Re: 100% stack bar chart

yes. I have week has the first dimension.

• ###### Re: 100% stack bar chart

Your second dimension has only one value?

If(Aggr(Sum(AMOUNT_CLIENT), [CLIENT],[YEAR],[WEEK]) < 10, 'Spender 1')

Nothing for when the condition is not met? Could that be the reason? I can't really say much without seeing what you have today? Can you share a sample?

• ###### Re: 100% stack bar chart

I Have multiple if statements which follows as spender 3, spender 4 , spender 5...

• ###### Re: 100% stack bar chart

Can you create a straight table with Week and your calculated dimension as your dimensions and two expressions

1) Count(DISTINCT client)

2) Count(DISTINCT TOTAL <WEEK> client)

Can you check if the second expression is totaling your Count of distinct client over any particular week?

• ###### Re: 100% stack bar chart

both the expression are giving out same values

• ###### Re: 100% stack bar chart

In your example. when i am selecting 2015, i am getting max of year that is 2016

Note : i have this expression as dimension as i am using bucketting.

and in the measure i am using

Count(({1<WEEK={"<=\$(=Max({<Year = {\$(=Max(Year))}>}WEEK))"}, Year = {\$(=Max(Year))}>} DISTINCT CLIENT)

• ###### Re: 100% stack bar chart

Hi,

• ###### Re: 100% stack bar chart

Would you be able to share a sample?

• ###### Re: 100% stack bar chart

sample? how do you want that? any specific format?

• ###### Re: 100% stack bar chart

a qvf file or excel data with your expected output will be helpful

• ###### Re: 100% stack bar chart

no option of attaching the file.

In the above screen.

at a week year level i have to show them 100 percent stack bar chart

condition being the last column.

if client count is 1 then 1st bucket, if client count is between 2 to 4 then 2nd bucket and so on..

• ###### Re: 100% stack bar chart

Check here to see how you can upload samples:

• ###### Re: 100% stack bar chart

All the options are not available for me.

• ###### Re: 100% stack bar chart

I Have attached a picture. will that be of any help?

• ###### Re: 100% stack bar chart

Hi

use following for getting 100% for Max ...

First expression :

Sum(AMOUNT_CLIENT)

Second expression

Sum(AMOUNT_CLIENT)

/

Max(TOTAL Aggr(Sum (AMOUNT_CLIENT)

, [CLIENT],[YEAR],[WEEK]))

• ###### Re: 100% stack bar chart

Hi,

Where shall i keep this expressions?

• ###### Re: 100% stack bar chart

Its coming as NULL Now.

• ###### Re: 100% stack bar chart

Hi All,

Can anyone please suggest me how to solve this scenario?