Skip to main content

Creating parameters in Tableau Public

Let's start today's blog with some questions. Are you greatly indulge in creating data visualization? Do you want to come up with scenarios that aren't available in the data? If yes then this is the blog you really want to read. Parameters allow you to create features or scenarios which help the user to control the data in a much better way.

You must be wondering how the users get a better control so mainly parameters allow the user to test different what-if scenarios that aren't available in the dataset. It is like some value that helps you to tailor your visualization according to the dataset. Options where you can use parameters in tableau- use it with calculated field or you can use it by combining with sets. We will look at both aspects in this blog. We can make the parameters more interactive and intuitive in nature by using parameter actions that allow users to change the value just by a click

As mentioned, we are considering two basic aspects for creating parameters. We are taking global sample superstore data into account for this blog. The idea is to get the top 10 product subcategories in terms of sales. It is quite basic to drag subcategories and sales into columns and rows respectively. Along with this apply a filter to subcategories where you can select the top 10 products with respect to sales.



This is the most common method but suppose you need to change the top n number such as top 5 products. For that, you will start from scratch and do the same thing if I say you can do this with help of one-click or toggle. It is possible with help of creating parameters. The same process continues taking the sub-category in the filter and then select the value in the top n tab to create a new parameter. It will take you to the next pop-up where you can enter the values such as the name of the parameter, minimum and maximum values.





After putting all the values click ok and add the parameters in your visualization. It will provide a slicer that you can adjust. Also, you will get the option to enter the number manually. Let's do the same thing in a much more intuitive way with the help of sets. Click on the subcategory and select create sets.


Start by naming your set. Select by field and in values, you can see your parameter is appearing to select the parameter "Top" which is created previously. After clicking ok drag the created set into colors and you will see a much more dynamic visualization. 


This is what parameter can bring to your visualization. In the end, a warning note does not confuse parameters with the filter. If you are using the same dataset for your visualization then you should select parameters instead of filters while if you are taking multiple datasets into account for your visualization then go for filter because you can not use the same filter in different worksheet but you can use the same parameter for the whole workbook. Parameters can be created in other data visualization tools too and I will do that in Power BI incoming blog.



Thanks for Reading  Let's connect on  LinkedIn.

 




Comments

Post a Comment

Popular posts from this blog

Ultimate Beginners Guide to DAX Studio

There are zillions of external tools available with Power BI but DAX Studio is one of the most commonly used tools to work with DAX queries. It is a perfect tool to optimize the DAX and the data model. In this blog let's shed some light on the basic functionalities that can take your report to the next level. ARE YOU READY?  To start you will need the latest version of the DAX Studio. You can download it from their website . Don't worry you don't have to pay for the license. Fortunately, DAX Studio is a free tool As a BI Developer, I am using DAX Studio regularly. Based on my experience I use it for several purposes but in this blog, I will highlight the most common ones. Extracting a dump of all the measures used in your PBIX. Why do we need to do this? It can be used for documentation purposes also sometimes we try to reuse the DAX and such a dump comes in handy in this scenario. How to achieve it? Open the DAX Studio it is located under the external tools once you open t

Append v/s Merge in Power BI

Let's discuss another problem of the week. As a Power BI user, there are times when you want to combine queries. What are the ways to do so? In most cases, you can attain it by using either append or merge and both serve different purposes. Let's understand what do these terms mean in Power BI and how they are functionally different from each other.  It is quite common to get data from various sources and you need to combine those data depending on a particular column which is common in both tables so that you can add extra information or column to your big table. In such cases, we use merge queries. How to perform merge queries? For instance, I am considering Sample Superstore data and we will merge the returns table to the order table. You will find both merge and append in the home tab in extreme right in the power query editor. ProTip - You will find two options when you click on the drop-down in merge which are merge queries and merge queries as new. When you use merge que

Use Relationship in DAX

Data modeling is an essential part of creating perfect visuals. While creating complex data models there can be a case where you can find an inactive relationship represented by dotted lines and it occurs because you already have an active relationship between the two tables. But as a developer, you need to use both the relationship. How can it be done? You can use "Use Relationship" in such cases. Use relationship can be added to your DAX and act as a modifier or enhancer for calculation. It activates the inactive relation. But make sure you have an inactive relationship in place before using the use relationship function. Let's see how it works on Sample Superstore data. In my fact table I have two dates- Order date and Ship date. I am making the two relations between my date table and fact table. The relation between the sample superstore (date) to date table (date) is active while the relation between the sample superstore (ship date) to date table (date) is inactive