Forum Discussion

abksharma's avatar
abksharma
Helper II
1 year ago
Solved

Data Type changes while importing semantic model to new Dashboard

measure e.g. [ccm_TotalDevice] Data Type changes while importing semantic model to new Dashboard, A text data type becomes another data type. I tried refreshing the dataset model, can not find any way to change the data type of a measure to TEXT again.

 

\

Imported to another Power BI report from Power BI service, this becomes measure [ccm_TotalDevice] becomes General/Number/Int

 

Thanks

 

A

 

 

 

  • Hi  @abksharma 
    Thank you for engaging with the Microsoft Fabric Community.
    In addtion reply to rajendraongole1 


    The below solution would be to explicitly convert the measure to a text data type using the FORMAT() function in DAX before importing it into the new Power BI report or dashboard.

    Modify your measure as follows:

    ccm_TotalDevice_Text = FORMAT([ccm_TotalDevice], "0")

     
    The measure is always treated as text, regardless of how it's imported or refreshed in the Power BI Service.
    By explicitly formatting it as text, you avoid any issues with the data type being automatically changed to General/Number/Int when imported into another report.

     

    If the above information helps you, please give us a Kudos and marked the reply as a solution.

    Thanks,
    Cheri Srikanth

     

7 Replies

  • Hi abksharma  -  you can check Measure Formatting in the Original Model:

    Open the original dataset in Power BI Desktop.
    Ensure that the measure [ccm_TotalDeviceCount] is explicitly formatted as Text. To do this:
    Go to the Model View, select the measure, and set its format to Text under the "Properties" pane.
    Re-Apply Text Formatting in the New Report:

    After importing the model into the new report, select the measure [ccm_TotalDeviceCount] in the Fields pane.
    Go to the Modeling tab and change the format to Text.

     

    still If the issue exist, try creating a new measure in the imported model with the same logic and explicitly format it as Text.

     

    Hope this helps.

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi  @abksharma 
    Thank you for engaging with the Microsoft Fabric Community.
    In addtion reply to rajendraongole1 


    The below solution would be to explicitly convert the measure to a text data type using the FORMAT() function in DAX before importing it into the new Power BI report or dashboard.

    Modify your measure as follows:

    ccm_TotalDevice_Text = FORMAT([ccm_TotalDevice], "0")

     
    The measure is always treated as text, regardless of how it's imported or refreshed in the Power BI Service.
    By explicitly formatting it as text, you avoid any issues with the data type being automatically changed to General/Number/Int when imported into another report.

     

    If the above information helps you, please give us a Kudos and marked the reply as a solution.

    Thanks,
    Cheri Srikanth

     

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi abksharma 

    I wanted to check if you had a chance to try the suggested solution of using the FORMAT() function to explicitly convert the measure to a text data type.

    Has it helped resolve the issue you were facing with the data type changing when importing the measure into another report?
    Please let us know if you need any further assistance.

    Looking forward to your update.

    If the above information helps you, please give us a Kudos and marked the reply as a solution.

    Thanks,
    Cheri Srikanth

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi abksharma 

    We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please accept as solution to help others benefit. If not, feel free to reach out.
    Thank you.

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi abksharma 
    Just checking in to see if the solution provided worked for you. If it did, consider marking it as accepted so others community members can benefit. 
    Thank you.

  • Having the same issue but with a date column, not a measure.

     

    Using a colleages semantic model which is set as Date on his file, and once we import this model into another report it converts the same column as date/time and unable to edit.

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi nmckeown1 
    Sorry for the late response.
    Could you please check and have try the suggested approach in the above repsonse.

     

    If the above information helps you, please give us a Kudos and marked the Accept as a solution.

    Best Regards,
    Community Support Team _ C Srikanth.