Forum Discussion
Error fetching data for this visual - column, relationship or measure not in a valid state
- 1 year ago
Hi nikkirai99 - Your formula itself is correct for what it intends to do, the way the RELATED function works in DAX and the setup of relationships between your tables.there is a one-to-many relationship between Reason Codes (one side) and Main (many side).
create simple measure as like below for test:
TestColumn = RELATED('Reason Codes'[ReasonCodeDate])
If this also results in an error, the issue is with the relationship. still, If the relationship is valid but still causes issues, try an alternative approach using LOOKUPVALUE
ReasonCodeDateResolved =
LOOKUPVALUE(
'Reason Codes'[ReasonCodeDate],
'Reason Codes'[ReasonCodeID], 'Main'[ReasonCodeID]
)This formula does not depend on the RELATED function and works even with inactive relationships.Focus on verifying the relationship between the tables and testing the logic with simpler measures.
Hi nikkirai99 - Your formula itself is correct for what it intends to do, the way the RELATED function works in DAX and the setup of relationships between your tables.there is a one-to-many relationship between Reason Codes (one side) and Main (many side).
create simple measure as like below for test:
TestColumn = RELATED('Reason Codes'[ReasonCodeDate])
If this also results in an error, the issue is with the relationship. still, If the relationship is valid but still causes issues, try an alternative approach using LOOKUPVALUE
ReasonCodeDateResolved =
LOOKUPVALUE(
'Reason Codes'[ReasonCodeDate],
'Reason Codes'[ReasonCodeID], 'Main'[ReasonCodeID]
)
This formula does not depend on the RELATED function and works even with inactive relationships.Focus on verifying the relationship between the tables and testing the logic with simpler measures.