Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

100% stacked bar chart

Hi,

I want to create a 100% stacked bar chart with below four expressions and one date column.

1)   SUM({<[Campaign Channel]={'PPC'},[Geography Country]={'usa'}>}[Site Visit Vis Num])

2)   SUM({<[Campaign Channel]={'Direct load'},[Geography Country]={'usa'}>}[Site Visit Vis Num])

3)   SUM({<[Campaign Channel]={'Natural Search'},[Geography Country]={'usa'}>}[Site Visit Vis Num])

4)   SUM({<[Campaign Channel]={'Referring Sites'},[Geography Country]={'usa'}>}[Site Visit Vis Num])

and above is my requirement. Pls help me on this issue

Regards,

Kumar

5 Replies
sushil353
Master II
Master II

Hi,

Try to divide each expression by SUM(total <Day> [Site Visit Vis Num])

for example.

SUM({<[Campaign Channel]={'PPC'},[Geography Country]={'usa'}>}[Site Visit Vis Num]) / SUM(total <Day> [Site Visit Vis Num])

HTH
Sushil

Anonymous
Not applicable
Author

Hi,

As u said I tried like this, but expression is throwing error. I am trying to convert the date column into DD/MM/YYYY format

SUM(TOTAL(date([Time Full Date],'DD/MM/YYYY'))[Site Visit Vis Num]). Anything wrong in this expression.

Regards,

Kumar

Not applicable
Author

Hi,

You can try this expression and In style tab click on stacked button.

SUM({<[Campaign Channel]={'PPC','Direct load','Natural Search','Referring Sites'},[Geography Country]={'usa'}>}[Site Visit Vis Num])

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Why would you be summing the date? The best place to format the date is when loading, but in this case you could also use a calculated dimension:

     =Date([Time Full Date], 'DD/MM/YYYY')

For the bars, Sushil's suggestion looks correct to me. If you are getting an error with this, please be a lot more specific about the error, or post a sample illustrating the problem.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Do u want me write for four expressions like the same way. I have four expressions