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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
pacifist
Helper II
Helper II

[DAX Help Needed] How to get the ID of related table into the visual so I can drill through?

Hi,

 

please consider the model on the screenshot.

pacifist_0-1695271978375.png

 

and then consider the visuals and the target state I'd like to achieve:

pacifist_2-1695272026842.png

 

 

Few pointers:
- it's the capacity metrics report

- there is WORKSPACES_VW, which is in active relationship with the DATASETS_VW as well as CM_ITEMS_DISTINCT_VW. 

- there is DATASETS_VW table visual, that has some basic properties (DSNs count, CREATOR etc...)
- there is REFRESH_DETAILS_VW that displays the datasets refresh details.

The problem I'm having is that I'm unable to get the DATASETS_VW[ID] field into that table visual so I could be drilling through to datasets details page. The visual says it cannot determine the relationship between the fields.

Can someone please help me to resolve it? Thank you!


[UPDATE]

Can someone explain to me why if I remove the __filterByDatasetId measure, and just add it to the visual filters, then the visual fails to render with "unable to determine the relationship between two or more fields"?

pacifist_0-1695283558999.png

That measure available in the target visual helps me to get the datasetId in there, but it's just so utterly slow compared to when it's not there...
Theat measure looks like this:

_filteredByDatasetId#3 = CALCULATE(
    COUNT(CAPACITY_METRICS_ITEMS_DISTINCT_VW[ITEM_ID]),
    USERELATIONSHIP(DATASETS_VW[ID], CAPACITY_METRICS_ITEMS_DISTINCT_VW[ITEM_ID])
)



3 REPLIES 3
lbendlin
Super User
Super User

Can someone explain to me why if I remove the __filterByDatasetId measure, and just add it to the visual filters, then the visual fails to render with "unable to determine the relationship between two or more fields"?

Your tables are not connected in the data model.  You need a measure (any measure) to create a crossjoin.

thank you. well, they are through that middle table (ITEMS_DISTINCT) via the ITEMID?

Follow the arrows. If you can't get there from here and vice versa then that's the same as not being connected. Especially when you are trying to join two fact tables (which you shouldn't do anyway).

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.