Forum Discussion
USERELATIONSHIP THROWING ERROR
Hello,
Below code throws an error "USERELATIONSHIP function can only use the two columns references participating in relationship."
Could someone can tell whats wrong here?
4 Replies
- Mahesh0016Super User
Anonymous please Try this formula.
Cases Last 13 Month =
var MaxDate = CALCULATE(
MAX('Calendar'[Calendar_last_day_of_month])
,USERELATIONSHIP('Calendar'[Calendar_last_day_of_month]
,'Presenatation calendar'[Calendar_last_day_of_month])
)
var MaxDate_13MonthsAgo =
DATESINPERIOD(
'Presenatation calendar'[Calendar_last_day_of_month]
,MaxDate
, -13
,MONTH
)
var Results =
CALCULATE(
Actuals_by_Month[Actuals_Volume],
REMOVEFILTERS('Calendar') ,
KEEPFILTERS(MaxDate_13MonthsAgo)
)RETURN
Results** If this post helps, please consider accept as solution to help other members find it more quickly and Appreciate your Kudos.
- AnonymousNot applicable
Thank you Mahesh0016 , BUT GETTING SAME ERROR.
- Mahesh0016Super User
Anonymous Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.