Forum Discussion
A numeric looking text column cannot be converted to number
- 1 year ago
I apologize for the delayed response due to my busy schedule. I'm experiencing an issue with a measure in Power BI. There's a relationship between the 'Value' field in the 'Time_period' table and the 'Value' field in the 'Master_Table'. However, when I try to use the measure to fetch the selected value from 'Time_period'[Value] independently, it returns a blank value.
When I break the relationship then and its working fine. No need to convert the value field in Master_table into numeric value.
Hi basaknilabja ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- basaknilabja1 year agoNew Member
I apologize for the delayed response due to my busy schedule. I'm experiencing an issue with a measure in Power BI. There's a relationship between the 'Value' field in the 'Time_period' table and the 'Value' field in the 'Master_Table'. However, when I try to use the measure to fetch the selected value from 'Time_period'[Value] independently, it returns a blank value.
When I break the relationship then and its working fine. No need to convert the value field in Master_table into numeric value.- V-yubandi-msft1 year ago
Community Support
Hi basaknilabja ,
Thank you for your patience, and I appreciate the clarification.
I tested the scenario using sample data and confirmed that when there is a relationship between Time_period[Value] and Master_Table[Value], a measure like SELECTEDVALUE(Time_period[Value]) may return blank due to filter context.
To resolve this, I used the following DAX to ignore the relationship filter from Master_Table.
TestMeasure = CALCULATE(SELECTEDVALUE('Time_period'[Value]), USERELATIONSHIP('Time_period'[Value], 'Master_Table'[Value]))This allows the selected value from Time_period to be returned regardless of the relationship.
Based on this test (see attached screenshot), the measure now behaves as expected and meets your requirement.
FYI:
I hope this helps...
— Yugandhar
Community Support Team.