Forum Discussion

jawnac's avatar
jawnac
New Member
9 years ago

NavigationProperty in $select in url generated by PowerBI

Having following structure: Car -> 1 - M -> Leases -> 1 - M -> Utilizations I want to find the count of Utilizations for each Car in Power BI. However the OData url generated by Power BI does not seem to be correct.

 

Reproduce steps

When opening Car feed and expanding Utilizations collection from Leases table Power BI uses following link to get the data:
odata/Cars?$expand=Leases($select=Id,Utilizations)

which is incorrect, because Utilizations is a NavigationProperty in Leases and in this case they are not returned.

 

Expected result

Utilizations collection is returned so that the user can aggregate on the results.

Correct link should be:
odata/Cars?$expand=Leases($select=Id;$expand=Utilizations)

 

Actual result

Utilizations collection is not returned. Only Id of each Lease is returned.

1 Reply

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Icon for Community Support rankCommunity Support

    Hi jawnac,

     

    What do you mean about "Car feed and expanding Utilizations collection"? It seems you are trying to connect to OData feed, and the generated URL like this odata/Cars?$expand=Leases($select=Id,Utilizations). Where did you find this URL, Advanced Editor?

     

    Can you share the same data for us to reproduce? It would be better if you could share the .PBIX file for our analysis.

     

    Best Regards,
    Qiuyun Yu