Have you worked with field parameters? Another functionality that Power BI offers is to improve your reports. What does it do for the users? At first, it looks like a button but it helps to toggle between different fields (can be columns or measures). Let's get our hands dirty and start with an example.
I am using sample superstore data. The idea is to make a clustered bar chart with profit and sales in it. On the Y axis, I need both category and subcategory. The basic approach will be just to add another level to the Y axis which will act as a drill down. But what if I say you don't need a drill down. Yes, that's possible with the use of field parameters.
Let's create one!! Go to the new parameter under modeling. Select the field parameter from there you will get a pop-up window that looks something like this. You can name your parameter and just drag the fields from the respective tables. I need only category and sub-category.
Pro tip- If you can't find the field parameter you need to go to the option and settings. In the preview feature, you need to enable the field parameter.
Once you click OK it will create a slicer (default setting). I am selecting a slicer with tiles. My visual has this parameter (parameter 1) on the Y-axis. Sales and profit on the X axis. If you check the data model you can see the parameter there. Now you can easily toggle around between categories and sub-categories.
Comments
Post a Comment