Forum Discussion
Date Parameter Based on Fields Not Working with USERELATIONSHIP
I am at a dead-end trying to figure out why my date table, on it's own, works just fine with all my measures, but will not work with my Parameter ( New parameters > fields > then the date fields I custom created are chosen)
Meausre Example:
Open Order =
CALCULATE(
SUM('Order Summary'[Open Order Ind]),
USERELATIONSHIP(Dates[Date],'Order Index'[Referral Date])
)
Calculated Column Example:
Yesterday = IF(Dates[Date] = (TODAY()-1),Dates[Date])
Parameter:
Date Filter = {
("Today", NAMEOF('Dates'[Today]), 0),
("This Week", NAMEOF('Dates'[CurrentWeek]), 1),
("This Month", NAMEOF('Dates'[CurrentMonth]), 2),
("This Quarter", NAMEOF('Dates'[CurrentQuarter]), 3),
("This Year", NAMEOF('Dates'[CurrentYear]), 4),
("Yesterday", NAMEOF('Dates'[Yesterday]), 5),
("Last Week", NAMEOF('Dates'[LastWeek]), 6),
("Last Quarter", NAMEOF('Dates'[LastQuarter]), 7),
("Last Month", NAMEOF('Dates'[LastMonth]), 8),
("Last Year", NAMEOF('Dates'[LastYear]), 9)
}
I don't understand how the slicer using the 'Dates'[Date] field works just fine, but the parameter based on the relationship of different dates joining back into 'Dates'[Date] doesn't work. Does anyone know why?
I have guesses, but I'm not sure where to start...
1. The Date Parameter should be based on a boolean calculated column and not dates.
2. Somehow the USERELATIONSHIP function within the measure is screwing something up.
Any help would be great. Thanks!
1 Reply
- TheoC
Community Champion
stevie_westside I'm going to go out on a limb here and say it may be associated with the fact that you're using Calculated Columns to attempt this (by their nature, they're static). You'd probably need to integrate USERRELATIONSHIP with a Measure (first option). Otherwise, you could test it with a direct relationship in Model view.