Forum Discussion
filter and search
'TableName'[ColumnA] is of datatype Text with values such as
1422.02.02
200500
50100
6401.03.03
...
The below DAX does not show any values eventhough I see texts starting with the below values i.e. 6 or 7 or 8 or 9
CALCULATE(
[MeasureB],
LEFT('TableName'[ColumnA], 1) = "6"
|| LEFT('TableName'[ColumnA], 1) = "7"
|| LEFT('TableName'[ColumnA], 1) = "8"
|| LEFT('TableName'[ColumnA], 1) = "9"
)
The below DAX fails with error: cannot convert value '' of type Text to type Number
CALCULATE(
[MeasureB,
VALUE(LEFT('TableName'[ColumnA], 1)) >= 6
)
Any suggestions please?
9 Replies
- parry2kSuper User
Anonymous what is measureb , then 2nd dax expression will fail if left of a string is blank and first one should work
- AnonymousNot applicable
measureB is number
- parry2kSuper User
Anonymous understood but what is the expression? Is it from same table? Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- v-piga-msftResident Rockstar
Hi Anonymous ,
By my test with your formula, I cannot reproduce your issue.
You could have a reference of my attachment.
In addition, if it is convenient, could you please share your data sample as table format and your desired output so that we could help further on it?
Best Regards,
Cherry