Forum Discussion
Anonymous
4 years agoNot applicable
Issue with Custom Measure - Cannot convert value " of type Text to type Number.
Hello, I am building a PBI report that includes some data and DAX coding for a current, working report. I keep getting the error "Cannot convert value " of type Text to type Number" when creating a ...
amitchandak
Super User
4 years agoAnonymous , First If month is not date then edate(SELECTEDVALUE('Month'[Month]),-2) might not work
better you deal with dates
new measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = eomonth(_max, -2) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))
- Anonymous4 years agoNot applicable
Thanks for the response! Can you clarify what you mean by the term 'Date' i.e.
allselected(Date),Date[Date] ?
Would that be the month column from the Month table I have? Sorry if this is a dumb response-- super new to PBI