Forum Discussion
WhaleWatcher222
Helper II
1 year agoDax measure error text and numerical values
Hi Experts
Cannot see the wood for the trees here where my error is - with the following DAX
1.1 Blanks =
VAR Avalue = AVERAGE([1.1])
VAR _NA = IF(VALUE(Avalue) = "N/A", "N/A",Avalue)
VAR _Blank = IF(ISBLANK(Avalue) = "--",Avalue)
RETURN
COALESCE(_NA, _Blank)WhaleWatcher222 So, in looking at this, you have code that returns a variant, as in it might return text or a number. That's not allowed. Has to be one or the other. BLANK() is acceptable for both but you have to have it return either always text or always a number.
2 Replies
- WhaleWatcher222
Helper II
Thanks Thought as much
- Greg_Deckler
Community Champion
WhaleWatcher222 So, in looking at this, you have code that returns a variant, as in it might return text or a number. That's not allowed. Has to be one or the other. BLANK() is acceptable for both but you have to have it return either always text or always a number.