Forum Discussion
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,
Hi ,
On this post I have found an answer some time ago
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.
11 Replies
- MFelixSuper User
Hi VoltesDev ,
Choice fields in Dataverse are stored has numbers and not fields, please check this documentation how to get the values you need.
https://docs.microsoft.com/en-us/power-apps/maker/data-platform/azure-synapse-link-choices-powerbi
If you need further assistance please tell me.
- MFelixSuper User
Hi ,
On this post I have found an answer some time ago
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.
- AnonymousNot 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.
- MFelixSuper User
Hi Anonymous ,
That happens because excel recognize the format and place it has number if it has no text characters.
- AnonymousNot 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.