Designing for Mobile is becoming more important
Designing for mobile is easy with Device Designer
An introductory challenge to Tableau's Device Designer
What’s up, everyone!? Thanks for checking in. It is becoming increasingly important to consider and design for multiple screen sizes when you are creating a dashboard. I’m sure I’m not alone in not having a lot of practice with this because in my day to day, 99.9% of my users are accessing my dashboards from a laptop/desktop monitor. And that’s why this #WOW2020 challenge from Lorna Brown is so great! It’s an easy, quick introduction into using Tableau’s device designer. Let’s take a closer look at her challenge and how to go about solving it.
Essentially, what we need to do is create a simple S&P dashboard but users need to be able to view it on multiple screen sizes. Lorna’s challenges us to create a mobile and tablet view. Along with a desktop view that is completely different from the mobile views directing them to view on mobile. She also provided a requirement to only use sets to create the product groups
The first view that we see on the mobile dashboard are the KPI BANS. This is only one (1) sheet and there’s a bit of a twist to it. You can see that 2019 is first followed by 2018. In my solution, I chose to use quick table calcs as opposed to using LODs. Here’s how my sheet is setup
This view is fairly straightforward, however, I did a couple things to get this work just right.
- Reversed the sort on Year
- Hide 2016 & 2017
- By hiding those years, Tableau is still able to do table calculations because hiding and filtering are completely different
- Rotated the Year label
- Change my quick table calc be calculate relative to “Previous”
- Because I reversed the Year sort, I need to also reverse how my table calc is being calculated. I need to reverse the order in which my table calc is evaluated
This looks good, but for profit Lorna is having us show both the top 10 & the bottom 10 products and we are to use sets to create the view. Now, if you call above, I already created my Top & Bottom sets so in order to get the correct 20 products to show up in the view I created the following calculation:
IF [Top 10 Products by Profit] OR [Bottom 10 Products by Profit] THEN [Product Name] END
So now when I put this new field on rows, I returns 21 rows; ten (10) rows for the Top Profit, ten (10) rows for Bottom profit and one (1) row for NULL which is a grouping all the products that are not in the top or bottom.
So we hide the NULL row but now we need to get the row labels to stratify the top and bottom products. There are a couple ways to do this, but I went the easy way, and simply put my Top 10 Set as the highest level on rows. It defaults the labels to IN/OUT but you can right click on each edit the alias, to which I changed to Top 10 & and Bottom 10, respectively.
Now we're ready to build our dynamic mobile views
Now let’s talk about Tableau device designer. Introduced in 2016, with Tableau’s UI overhaul with version 10, they introduced the ability to dynamically change the look and feel solely based on your size of the screen that’s viewing the dashboard. In 4 years, I don’t think it’s gotten as much attention from the community as other features, but it’s pretty important if you think about. And maybe, perhaps, that’s because the majority of dashboards on Tableau Public aren’t intended for multiple screens. Anyway, I could go on but let’s get to it.
So right in the top left you see different devices. Each one can be set up completely different, if you want. Or each will be auto-generated based on the Default view.
I chose to set up the default view and simply stacked everything they way they be and added text boxes where appropriate. Then I modified the phone layout to fit width and adjusted the height accordingly so that every view was visible.
To add the Tablet and Desktop device, simply select device preview and select your desired device and adjust as needed.
But what about the desktop view? Why/How is it completely different? Here’s where the real power of device designer lies. Each device can be completely different dashboards if you choose. So what we did for the desktop dashboard is remove everything on it place a single text box with our desired text.
Pretty cool, right?
So that’s it! Feel free to download a copy of my workbook and reverse engineer what I did while reading through this blog. Hopefully everything clicks for you but please reach out and let me know if you have any questions.
And with that I say to you…
GO FORTH AND VIZ!
Pingback: Best of the Tableau Web: Sparking creativity and new ways of thinking | Tableau Software