Forum Discussion
ToNo87
9 years agoRegular Visitor
using the Format on a datetime gives error for not using max, count or sum
Hi, I have the following DAX measure Year-Month-Setup = FORMAT('Setup'[EventTime], "YYYY-MM") the EventTime is in a DateTime Format, I can have multiple entires on a day. I want to make a referen...
- 9 years ago
Yes, that I can understand, however doing min or max will only give me one value, I can have multiple months of data?
EDIT: I changed it to a column and it solved the problem.
Anonymous
9 years agoNot applicable
You're adding this as a measure, which means you have to have some kind of aggregation. FORMAT just formats a single result. You're giving it a column reference, which is not a single result. You'll need to nest something inside that format to get a single result. FORMAT(MIN('Setup'[EventTime]), "YYY-MM") or something like that.
ToNo87
9 years agoRegular Visitor
Yes, that I can understand, however doing min or max will only give me one value, I can have multiple months of data?
EDIT: I changed it to a column and it solved the problem.