Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

0

Numeric and Alphanumeric data loaded into model as TEXT data type but are different in measure

Hello, BI seems to trea data loaded as Text data type differently based on whether the data being loaded as Text is numeric vs alphanumeric:

 

 have a measure that has 2 filters based on a Text data type:

 

JeanMariePBI_0-1651599998221.png

JeanMariePBI_1-1651600054232.png

When the prod id is numeric, the measure works correctly, but the measure does not work if an alphanumeric prod id is loaded to model (prod id is always being loaded to model as Text data type)

JeanMariePBI_2-1651600157499.png

This is the complete logic for the measure:

JeanMariePBI_3-1651600228992.png

If both prod ids are being loaded as a Text data type why does the measure work for the numeric prod id and not for the alphnumeric?

 

 

 

Status: Delivered

Hi @JeanMariePBI ,

 

When you load data into Power BI Desktop, it will attempt to convert the data type of the source column into a data type that better supports more efficient storage, calculations, and data visualization. For example, if a column of values you import from Excel has no fractional values, Power BI Desktop will convert the entire column of data to a Whole Number data type, which is better suited for storing integers.

This concept is important because some DAX functions have special data type requirements. While in many cases DAX will implicitly convert a data type for you, there are some cases where it will not. For instance, if a DAX function requires a Date data type and the data type for your column is Text, the DAX function will not work correctly. So, it’s both important and useful to get the correct data type for a column. 

 

You may refer to this article to get further help.

Data types in Power BI Desktop 

 

Best Regards,
Community Support Team _ Caitlyn

 

Comments
v-xiaoyan-msft
Community Support
Status changed to: Delivered

Hi @JeanMariePBI ,

 

When you load data into Power BI Desktop, it will attempt to convert the data type of the source column into a data type that better supports more efficient storage, calculations, and data visualization. For example, if a column of values you import from Excel has no fractional values, Power BI Desktop will convert the entire column of data to a Whole Number data type, which is better suited for storing integers.

This concept is important because some DAX functions have special data type requirements. While in many cases DAX will implicitly convert a data type for you, there are some cases where it will not. For instance, if a DAX function requires a Date data type and the data type for your column is Text, the DAX function will not work correctly. So, it’s both important and useful to get the correct data type for a column. 

 

You may refer to this article to get further help.

Data types in Power BI Desktop 

 

Best Regards,
Community Support Team _ Caitlyn