Forum Discussion
New Column - Using related function "parameter is not the correct type"
Hi,
I am trying to create a new column in order to calculate the distance between locations using latitude and longitude. To do this I created a new column under one sheet and used the related function in dax to get a column from another sheet. This seemed to work at first but as I continued that line it gave an error message shown below.I'm sure that I'm not going about this correctly in some way. It wouldn't accept the field regardless of if it was text or numerical. Would love to hear other ways to troubleshoot this, thanks so much for any help! I also attached a photo below showing that this field appeared after entering the function so it seems to have some ability to connect.
I'm not sure this is the extent of the problem you are facing, but at the very least you need a closing parentheses after Active_Nonprofit_Network[NPO].
Distance = ACOS(SIN(RELATED(Active_Nonprofit_Network[NPO]) * PI()/180)))
2 Replies
- SunRiserRegular Visitor
I'm not sure this is the extent of the problem you are facing, but at the very least you need a closing parentheses after Active_Nonprofit_Network[NPO].
Distance = ACOS(SIN(RELATED(Active_Nonprofit_Network[NPO]) * PI()/180)))- trevorw1329Regular Visitor
Thank you, all good now! Haha not sure how this didn't occur to me