Forum Discussion

VoltesDev's avatar
VoltesDev
Helper V
4 years ago
Solved

Data from Dataverse Choice column

Hi guys,

 

Need some clarification. I'm using Dataverse as my datasource, when my table have a Choice column like below:

And this collumn/fields accept multiple value, so the data will be like this :

 

When I connect it from Power BI, either Import Mode or Direct Query, I should get the NUMERIC VALUE AND DESCRIPTION (NAME), am I right ?

 

Because currently my Power BI only showing the numeric like this :

 

Anyone know why ? and how to solve this issue ?

 

Thanks,

  • MFelix's avatar
    MFelix
    4 years ago

    Hi  , 

    On this post I have found an answer some time ago

    https://community.powerbi.com/t5/Desktop/Can-t-see-the-display-value-of-a-choice-column-from-a-table-in/td-p/1652535

     

     

    So you have some older choice fields which are working correctly, but newly created ones don't?

     

     

    The answer is this one:

    This is a by-design scenario as Dataverse store Choice type value in numeric. As a workaround, mapping relationship between on choice type value can be exported via another API call, please try using Power BI Web connector and access source link via below:

    https://<environmentName>/api/data/v9.2/EntityDefinitions(LogicalName='<TableName>')/Attributes(LogicalName='<Choice Name>')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=GlobalOptionSet($select=Options)

    where environment name = org12345678..api.crm6.dynamics.com

    Essentially adding another table with the value/name pairing and  joining to the original table.   I have about 12 choices so far in my database, so this is painful. 

    VoltesDev

11 Replies

    • VoltesDev's avatar
      VoltesDev
      Helper V

      Hi MFelix 

      But that document is for getting data from Datalake (which probably the source is Dataverse). 

      My report datasource is directly to Dataverse, by using the Dataverse buton ->

       

       

       

      Thanks

      • MFelix's avatar
        MFelix
        Super User

        Hi  , 

        On this post I have found an answer some time ago

        https://community.powerbi.com/t5/Desktop/Can-t-see-the-display-value-of-a-choice-column-from-a-table-in/td-p/1652535

         

         

        So you have some older choice fields which are working correctly, but newly created ones don't?

         

         

        The answer is this one:

        This is a by-design scenario as Dataverse store Choice type value in numeric. As a workaround, mapping relationship between on choice type value can be exported via another API call, please try using Power BI Web connector and access source link via below:

        https://<environmentName>/api/data/v9.2/EntityDefinitions(LogicalName='<TableName>')/Attributes(LogicalName='<Choice Name>')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=GlobalOptionSet($select=Options)

        where environment name = org12345678..api.crm6.dynamics.com

        Essentially adding another table with the value/name pairing and  joining to the original table.   I have about 12 choices so far in my database, so this is painful. 

        VoltesDev

  • Anonymous's avatar
    Anonymous
    Not applicable

    Is this the answer for getting numeric value from choice column? When exporting a dataverse table to excel will give me a numeric column, in dataverse is a text field.

    • MFelix's avatar
      MFelix
      Super User

      Hi Anonymous ,

       

      That happens because excel recognize the format and place it has number if it has no text characters.

      • Anonymous's avatar
        Anonymous
        Not applicable

        MFelix Sorry I meant the Lookup column. I excel this return the primary column (textfield) and the numeric value from the alternate key. This do not happen in Power BI.