During our trainingsfor new Power BI users, we often notice that they don’t always realise how much creating a correct data model could help them. For example:
- Data are read quicker
- Calculations are executed faster
Vaak importeert men de gegevens vanuit de bron onmiddellijk in het model, worden de nodige relaties getekend en start men vervolgens met het creëren van de visuals.
Many aspects are ignored in this process, such as:
- Renaming fields/tables
- Optimising the data model by using a ‘star schema’
- Defining measures so that you can immediately find the correct name and formatting of calculations
- Configuring data categories
In this post, I’ll tell you more about how to configure data categories. By optimising your data model, you can make it more user-friendly – not only for the report builder, but also for the end users.
This is because a data category allows you to define the purpose of a specific column in your model. You can use a data category to indicate that a certain column contains cities or countries, for example. If you do this, Power BI can automatically position the data in this column on a map. But you can also use it to show a certain image depending on the result of a calculation.
If we drag the Cityfield onto the page, we’ll see a normal table. Of course, you can change the visual to a geographic view afterwards, but it’s a lot easier if this happens automatically.
You can do this as follows:
- Select the Citycolumn in the fields list.
- Go to the Column tools – Data Category menu and select the Cityvalue.
You’ll see that the field in the field list is now preceded by a globe icon.
- If you drag the field onto the page now, you’ll automatically see a map.
It’s perfectly possible that your version of Power BI automatically shows a map without selecting a data category first. This can happen if the language Power BI is configured in is the same as the language in the field. In the example above, I’m using the Dutch word Stad(City) in an English version of Power BI. In a Dutch version of Power BI, I’d immediately see a map – but if I named the field Cityinstead of Stad. it wouldn’t work. If you configure the data category, it’ll always work, regardless of the language used in the fields and in Power BI.
If your model contains a column with a URL that refers to an image, you can set the data category for this column to Image URL.
As a result, the information in the column won’t be presented as a URL, but as the image it refers to.
Apart from geographical locations and images, you can also refer to any URL, such as a web page, or an e-mail address. To do this, you’ll need to choose the data category Web URL. To do this, you’ll need to choose the data category Web URL.The visuals will then contain a link which you can click.
Lastly, you can also link a data category to a measure. This will let you execute a calculation that results in a URL. If you then configure this measure as an Image URLor Web URL, the measure will display an image or a clickable link. If you play with the filters, the measure will yield different results, so you’ll see a different image or the link will take you to a different page.
If you’d like more useful tips about Power BI, be sure to follow one of our trainings. Are you looking for a Power BI expert to help you create your own reports? Contact us at email@example.com or +2 264 13 20 for a non-binding offer.