Hello,
I have a report that contains multiple tables, one is in 'Import' mode, and the other is in 'DirectQuery' mode and is linked to another report.
Import: Grille tarifaire[Moyenne]
DirectQuery: Affaire[TJM Vendu]
I'm trying to create a calculated column with this function: Flag TJM PFSA = if(RELATED('Grille tarifaire'[Moyenne]) = BLANK(), 5, if(RELATED('Grille tarifaire'[Moyenne]) >= Affaire[TJM Vendu],1,10))
But Power BI is giving me this error: The column 'Grille tarifaire[Moyenne]' either doesn't exist or doesn't have a relationship with any table available in the current context.
However, I have established a relationship between the two tables using a reference, and the relationship is active with the correct cardinality.
And when creating the column using "RELATED", Grille tarifaire shows up as a suggestion.
If anyone has any tips or a solution to my problem, I would greatly appreciate it.
Thank you 🙂
Hi @NathanPzi ,
If the relationship is one to many, RELATED function can only be used in the many side table. In other words, 'Grille tarifaire' should be the one side in the relationship.
If not, you can use this formula to reference:
MAXX ( FILTER ( 'table2', 'table2'[column1] = 'table1'[column1] ), [column2] )
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.