Forum Discussion
Raj341
2 years agoFrequent Visitor
Last 30 days using dynamic date slicer
Hi All, I am attempting to achieve the following scenario: I have 3 columns: Date, Reasons, and Value. When I click on the date slicer in the matrix visual, the data should reflect the last 30 days...
Ashish_Mathur
2 years agoSuper User
Hi,
See if my solution, to a similar problem, in the attached file helps.
- Raj3412 years agoFrequent Visitor
Thank you for your response.
I replicated the same calculation.
Measure = CALCULATE([D], USERELATIONSHIP(Lines[Date], Calendar_dup[Date]), DATESBETWEEN(Calendar_dup[Date], MAX(Calendar_dup[Date]) - 6, MAX(Calendar_dup[Date])))
I followed the same process you did in data modeling, but I am encountering a different error:
Error: The USERELATIONSHIP function can only use the two column references participating in the relationship.
- Ashish_Mathur2 years agoSuper User
You are welcome. Ensure that there is an inactive relationship between the Date column of the Lines table to the Date column of the Calendar_dup table.