Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I've not been able to get my distance calculation working. I'm following a solution on another post, but the only difference between this one and mine is that some of my coords are in another table so i am using RELATED. My code is:
Distance = ACOS(SIN('LB_Incident_Post1970'[Incident_Latitude])*
SIN(RELATED('GIS.LifeboatStations'[Stn_Latitude])+
COS('LB_Incident_Post1970'[Incident_Latitude])*
COS(RELATED('GIS.LifeboatStations'[Stn_Latitude])*
COS(RELATED('GIS.LifeboatStations'[Stn_Longitude] - LB_Incident_Post1970[Incident_Longitude]))
*6371)))
Can someone spot where i have gone wrong? I'm getting the error "Function RELATED expects a fully qualified column reference as it's argument".
Solved! Go to Solution.
@rogerdea , seem like a problem with ) , check one in bold
Distance = ACOS(SIN('LB_Incident_Post1970'[Incident_Latitude])*
SIN(RELATED('GIS.LifeboatStations'[Stn_Latitude])+
COS('LB_Incident_Post1970'[Incident_Latitude])*
COS(RELATED('GIS.LifeboatStations'[Stn_Latitude])*
COS(RELATED('GIS.LifeboatStations'[Stn_Longitude]) - LB_Incident_Post1970[Incident_Longitude]))
*6371))
@rogerdea , seem like a problem with ) , check one in bold
Distance = ACOS(SIN('LB_Incident_Post1970'[Incident_Latitude])*
SIN(RELATED('GIS.LifeboatStations'[Stn_Latitude])+
COS('LB_Incident_Post1970'[Incident_Latitude])*
COS(RELATED('GIS.LifeboatStations'[Stn_Latitude])*
COS(RELATED('GIS.LifeboatStations'[Stn_Longitude]) - LB_Incident_Post1970[Incident_Longitude]))
*6371))
Hi @rogerdea ,
Found a related thread, see if any of the suggesstions is applicable in your case.
If not, please share your pbix file removing all the sensitive data, to try and replicate the issue.
Thanks
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
94 | |
88 | |
35 | |
32 |
User | Count |
---|---|
153 | |
101 | |
82 | |
63 | |
52 |