What are data categories in Power BI?

During our trainings for 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

People often import data straight from the source into the model, map out the necessary relationships and start creating the 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.

Geographical locations

If we drag the City field 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 City column in the fields list.
  • Go to the Column tools - Data Category menu and select the City value.
    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 City instead of Stad in the Dutch version, 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.

Images

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.

Other references

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. 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 URL or 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 xyloslearning@xylos.com or +2 264 13 20 for a non-binding offer.

Share this blogpost
Categories: Power BI
Tags: PowerBI

Also interesting for you

Leave a reply

Your email address will not be published. Required fields are marked.

Bring your knowledge and skills to a higher level

Subscribe for our monthly newsletter and receive:

  • Exclusive tips & tricks
  • Information about our courses
  • Trends on courses
  • Invitations to seminars and events

Most popular courses