Announcements
cancel
Showing results for
Did you mean:
Contributor III

## 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 .

22 Replies
MVP

May be try an expression like this:

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

Contributor III
Author

hi,

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

MVP

You have Week as your first dimension, right?

Contributor III
Author

yes. I have week has the first dimension.

MVP

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?

Contributor III
Author

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

MVP

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?

Contributor III
Author

both the expression are giving out same values

Contributor III
Author

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)

Tags