Forum Discussion
Need help selecting a value using userelationship
I have a calendar table that contains offset values for day, week, month, etc. These allow me to setup my visuals with filters such as 'WeekOffset = 0" for week-to-date valuses. The issue I have is that my active relationship is Order Date -> Calendar Date. Howerver, I want to use the ShipDate -> Calendar Date. I've used userelationship for valuse, but can't get it to work for setting of a value to use in my filters.
I've tried the following but get incorrect values.
I'm sure I'm missing something simple with this one.
- Anonymous2 years ago
Do you have an inactive relationship between ship date and calendar date. Pls check the model view.
- Anonymous2 years ago
Thanks for the reply fromAnonymous , please allow me to provide another insight:
Hi,Anonymous
Regarding the issue you raised, my solution is as follows:
1.First of all, as Rakesh1705 says, if there is an active relationship between order_file [SHIPPED_Date] and 'Calendar' [Date], it will override the relationship you are trying to use USERELATIONSHIP. You may want to check for any active relationships that may interfere with your calculations. To ensure proper use of functions, you can also establish an inactive relationship between order_file [SHIPPED_Date] and Calendar [Date].
Here is a screenshot of the relevant official documentation:
Here are the relevant links that we hope you will find helpful:
USERELATIONSHIP function (DAX) - DAX | Microsoft Learn
Solved: PowerBI USERELATIONSHIP function used in a measure... - Microsoft Fabric Community
2.Second, you can check if the dax is written correctly. The first parameter in a function usually represents the parties of the relationship to be used, and the second parameter represents one or lookup party of the relationship that is usually used to be used.
Here is a screenshot of the relevant official documentation:
3.Then, verify that the filter direction supports propagation.
Here are the relevant links that we hope you will find helpful:
Create and manage relationships in Power BI Desktop - Power BI | Microsoft Learn
4.Finally, you can use the RELATED ()function or the LookupValue ()function.
Here are the relevant documentation and links to similar issues:
RELATED function (DAX) - DAX | Microsoft Learn
Solved: Userelationship does not return correct value in m... - Microsoft Fabric Community
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
5.You may want to note that the USERELATIONSHIP() function can be evaluated multiple times, and when two or more items depend on each other, a loop-related item error occurs. Check for implicit loops in the expression.
Solved: Look up multiple value using USERELATIONSHIP - Microsoft Fabric Community
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- AnonymousNot applicable
Do you have an inactive relationship between ship date and calendar date. Pls check the model view.
- AnonymousNot applicable
Thanks for the reply fromAnonymous , please allow me to provide another insight:
Hi,Anonymous
Regarding the issue you raised, my solution is as follows:
1.First of all, as Rakesh1705 says, if there is an active relationship between order_file [SHIPPED_Date] and 'Calendar' [Date], it will override the relationship you are trying to use USERELATIONSHIP. You may want to check for any active relationships that may interfere with your calculations. To ensure proper use of functions, you can also establish an inactive relationship between order_file [SHIPPED_Date] and Calendar [Date].
Here is a screenshot of the relevant official documentation:
Here are the relevant links that we hope you will find helpful:
USERELATIONSHIP function (DAX) - DAX | Microsoft Learn
Solved: PowerBI USERELATIONSHIP function used in a measure... - Microsoft Fabric Community
2.Second, you can check if the dax is written correctly. The first parameter in a function usually represents the parties of the relationship to be used, and the second parameter represents one or lookup party of the relationship that is usually used to be used.
Here is a screenshot of the relevant official documentation:
3.Then, verify that the filter direction supports propagation.
Here are the relevant links that we hope you will find helpful:
Create and manage relationships in Power BI Desktop - Power BI | Microsoft Learn
4.Finally, you can use the RELATED ()function or the LookupValue ()function.
Here are the relevant documentation and links to similar issues:
RELATED function (DAX) - DAX | Microsoft Learn
Solved: Userelationship does not return correct value in m... - Microsoft Fabric Community
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
5.You may want to note that the USERELATIONSHIP() function can be evaluated multiple times, and when two or more items depend on each other, a loop-related item error occurs. Check for implicit loops in the expression.
Solved: Look up multiple value using USERELATIONSHIP - Microsoft Fabric Community
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.