Forum Discussion
Irwin
4 years agoHelper IV
Related + userelationship ?
Hi Guys, I need to create a calculated column with userelatioship. So far I have made a monthyear column with related refering to my date table. This works fine and the date is displayed ...
- 4 years ago
Okay I managed to solve it with this article:
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Its long and complicated... I didnt understand everything but once I used their measure it worked.
MonthStartDate =CALCULATE (SELECTEDVALUE ( DimCalendar[MonthYearKey] ),CALCULATETABLE('TaskTable(Lots)',USERELATIONSHIP ( 'TaskTable(Lots)'[Start Date], 'DimCalendar'[CalendarKey] ),REMOVEFILTERS('DimCalendar')))Thanks for your answer amitchandak, I will definately try it out as well.
Irwin
4 years agoHelper IV
Okay I managed to solve it with this article:
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Its long and complicated... I didnt understand everything but once I used their measure it worked.
MonthStartDate =
CALCULATE (
SELECTEDVALUE ( DimCalendar[MonthYearKey] ),
CALCULATETABLE(
'TaskTable(Lots)',
USERELATIONSHIP ( 'TaskTable(Lots)'[Start Date], 'DimCalendar'[CalendarKey] ),
REMOVEFILTERS('DimCalendar')
)
)
Thanks for your answer amitchandak, I will definately try it out as well.