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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
PbiCeo
Helper II
Helper II

How to get label value of OptionSet Attribute of accountcategorycode for Dynamics entity with PQ

Hello everyone,

 

I tried to get label value of OptionSet Attribute of accountcategorycode for Dynamics entity with PQ,

but I couldn't.

The following is Dynamics web API which works on the browser and I want to do the same thing using PQ.

How should I write it?

GET[OrganizationURI]/api/data/v9.1/EntityDefinitions(LogicalName='account')/Attributes(LogicalName='accountcategorycode')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?
$select=LogicalName&$expand=OptionSet($select=Options),GlobalOptionSet($select=Options)

 


It works as PQ, but it is slightly different from what I want to get and doesn't work for ODBC.
GET[OrganizationURI]/api/data/v9.0/EntityDefinitions(LogicalName='account')?$select=LogicalName&$expand=Attributes($select=LogicalName;$filter=AttributeType eq Microsoft.Dynamics.CRM.AttributeTypeCode'Picklist')

Does anyone give me advice?
Many thanks in advance,
Vladi

2 REPLIES 2
lbendlin
Super User
Super User

show your Web.Contents() Power Query code.

Actually I tried it with Excel using Dynamics connector.

Is Power BI PQ different from Excel PQ? 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors