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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Advocate I
Advocate I

The query referenced a relationship which depends on a column that is not in a valid state

Full error:

"The query referenced a relationship between 'Fact_tb'[dimension] and 'Dimension_tb'[Dimension], which depends on a column that is not in a valid state."

I've created a calculated table based on two fact tables, pulling a distinct of a column (present in both) wich is the dimension I desire to have in a single table. Then used Union on both Distinct Columns and used Distinct again, to get a single usable result. DAX:

Dimension_tb = DISTINCT(
                                  DISTINCT( Fact_tb[dimension]),

This works fine on Desktop. After publishing it works fine on the PBI Service. But after refreshing the Dataset it results in that error, and I've tried:

1. Checking Data types (Both text)
2. Checking for Case on both (Used Upper on PQ on both)
3. Checking sources. One is imported from a SQL DB, the other from a Dataflow (Which pulls from a SQL DB)

Everything indicated this should work, but it doesn't. I'm doing this in DAX because in PQ I have to load the fact tables multiple times and include them in the refresh (Tables are huge). With the calculated table I only refresh the fact tables once.

What else to do?

Advocate I
Advocate I

@Sahir_Maharaj Hello!
It has unfortunatelly not worked.

Super User
Super User

Hello @dlopesc04,


Can you please try this simplified DAX:


Dimension_tb = DISTINCT(
        SELECTCOLUMNS(Fact_tb, "dimension", Fact_tb[dimension]),
        SELECTCOLUMNS(Fact_tb2, "dimension", Fact_tb2[dimension])

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution?
➤ Lets connect on LinkedIn: Join my network of 13K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website:
➤ Email:
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views):
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.


Fabric certifications survey

Certification feedback opportunity for the community.