top of page

Dynamic Data Type in PowerBI

Updated: May 31, 2024

By Ashish Kumar



In this article, we will see how we can use dynamic data type feature in Power BI.

Before we dive into this, let us understand what a dynamic data type is? and what it can be used for?

Dynamic data type is a data type format option by which we can show the values generated by the measure into two or more different data types dynamically.


Steps involved in implementation of Dynamic data type: -


  1. First, we need to create a calculated table in which we need to define the data format.

calculated table
calculated table

2. After creating the table, we need to create the measure with dynamic data type selection. Click on “New measure” option from the Home ribbon.

Measures
Measures

3. Apply your measure logic just like the below figure.


DAX
DAX

4. After writing the logic, please click on dropdown box of the format option and click on “Dynamic” data type, as shown in the below snapshot.

Data Type
Data Type

5. The moment when you select the Format as “Dynamic”, you can notice that there is a list-box appearing (also visible in above snapshot).


Measure List box
Measure List box

6. After that please click on the dropdown of the list-box and select format option, we need to specify the format of data which is not available in the Table Format so that, we can provide the alternate result.


Format List box
Format List box










Alternate data type resultt
Alternate data type result

Now, you can see dynamic data type in PowerBI. In our case, which is a numerical and a percentage value.

In case of any questions, please add your comments and stay tuned !! for our next upcoming exciting Power BI articles.



3 Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Guest
Sep 19, 2024

Instead of using a calculated table in step 1, is a regular table allowed too?

Like

Guest
May 29, 2024

you should go more into depth like applying switch() so that you can output the different formats vs just 1 which could be done with out dynamic data types.

Like
Nishant Kishu
Nishant Kishu
May 29, 2024
Replying to

That makes sense but has a drawback whenever using a switch() function. It is a little bit more complex as compared to dynamic data types features. If new data types come in the near future, it needs downloads of the datasets. Again we need to change in the measure then publish. It will do it again and again.

We will avoid this scenario with the help of dynamic data types selection. Here we could use Excel/other data stores as source where maintain the data types instead of calculated table. In this scenario , we need to add data only to the source label after we just need to refresh the dataset and changes should be reflected in a short span…

Like
bottom of page