1 2 Previous Next 21 Replies Latest reply on Jul 24, 2018 10:25 AM by Shinichiro Murakami

# Color By LOD Dimension?

After playing around with a response to a related post, I have another question about how to create the 100% stacked bar chart that I want.  The data is email logs.  I know how many emails were opened, and I know how many of those emails had a link clicked.  We want to get people to click on the links, so the "success rate" is (clicks / opens).  Simple enough.  I've used some LOD's and have created a calculation that is the "opens without a click".  Total Opens = Clicks + Opens without a Click.

I'm having trouble, though, coloring by the was clicked/wasn't clicked in my bar chart.  For the "CC Expire" email in January, you'll see in the data that there were a total of 500 opens.  Of those 500, 90 opened emails had a link that was clicked.  Therefore, I want to show 410 in one color (on the left) and 90 in another color (on the right).  I'm having trouble wrapping my head around defining the "color by" dimension.  I think that's all I need help with.  I appreciate any help you can provide!  Thank you!

100% Bar Chart:

Data:

• ###### 1. Re: Color By LOD Dimension?

Your [Type] field is the one that governs those LODs.

Just drag [Type] to COLORS and see if that does it for you.

• ###### 3. Re: Color By LOD Dimension?

You just wanted to get 410 on the orange bar instead of 500, right?  (And likewise for all the orange bars.)

If so, see attached.

1 of 1 people found this helpful
• ###### 4. Re: Color By LOD Dimension?

That does indeed work, Joe.  Thank you for that blazing fast response!  I'm still wrapping my head around the calculation and I'll have to apply it to what I have.

How would you name that Calculation1 that you created?  I'm not even sure what to call it - sounds goofy, but true!

• ###### 5. Re: Color By LOD Dimension?

Maybe [Display Value].

Notice that the size of the bars are still governed by SUM(Count).  I just shoved the actual display value onto the Labels shelf.

• ###### 6. Re: Color By LOD Dimension?

I tried to replace the SUM(Count) table calc with the AGG(Calculation1).  It works until I try to make it 100% "wide".  Hmm...

I'm attaching a band-aid solution and I feel like there has to be a better (ie - better performance) way.  Eventually I'm going to be working with 100m+ records!  Eek!

• ###### 7. Re: Color By LOD Dimension?

Regarding your last question, I guess I misunderstood again.

The two values you have:  Clicked by year, and Opened by year are 500 and 600 respectively.  That's what's being used by your SUM(Count) table calc (essentially).  That makes a 45/55 split.

Are you actually looking for a total of 600 to be divided up by that overall calc?

• ###### 8. Re: Color By LOD Dimension?

Thanks,

Shin

1 of 1 people found this helpful
• ###### 9. Re: Color By LOD Dimension?

Yup, Shin.  That's where it has to go.

Matt -- You can't rely on a quick table calc at this point.  You have to make your own calc to subtract out the counts and do your own percentages as Shin did.

1 of 1 people found this helpful
• ###### 10. Re: Color By LOD Dimension?

Thank you Shin and Joe!  I have some work to do!  Many many thanks for your help.

• ###### 11. Re: Color By LOD Dimension?

HI Joe

Sorry for jumping in.

I might kept open the thread for a while and did not realize you were communicating..

Shin

• ###### 12. Re: Color By LOD Dimension?

Shinichiro Murakami and Joe Oppelt, thank you both very much.  I blended the two solutions you provided and I think I have what I need now!  I really appreciate your help.  Unfortunately I can't mark them both as Correct, so Joe wins because he responded first and has slightly fewer points so I'll help a brother out .  You're both great assets to the Tableau community!

• ###### 13. Re: Color By LOD Dimension?

HI Matt,

You are welcome.

Shin

• ###### 14. Re: Color By LOD Dimension?

Shin -- That's perfectly fine.  I'm really under the gun at work here, so you saved me the time of hacking up that next step.

Hey, are you going to be at the conference in October?  I got approval from management, so I'll be there.

1 2 Previous Next