Forum Discussion
Error Using RELATED with CALCULATE
- 2 years ago
Greg_Deckler
Greg, thanks again for your help! I was able to solve the issue by changing my DAX calculation. Because of the direction of the relationships, RELATED was not needed.
BlueRanger Without something to test it's difficult to know for certain. One option would be to change the relationship filter directin to Both. Alternatively, you could perhaps use CALCULATE and CROSSFILTER to get the value instead of RELATED. Or, you could use LOOKUPVALUE or MAXX( FILTER( to also lookup the value instead of RELATED. If none of that helps...
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Greg_Deckler
Greg, thanks again for your help! I was able to solve the issue by changing my DAX calculation. Because of the direction of the relationships, RELATED was not needed.