Forum Discussion
JemmaD
2 years agoHelper V
Sum a column which contains multiple data types
Hi there, I have a column which contains decimals, dates and text. I want to sum it when the data type is decimal, and ideally just show the text or date values unaggregated - but if this is not pos...
Gabry
2 years agoSuper User
I understand, can't you set up the data type to any in power query? Just wondering. If not maybe you can try convert it
SumOfDecimals =
SUMX(
'Exception Details',
IF(
ISERROR(CONVERT('Exception Details'[value], DOUBLE)),
0,
CONVERT('Exception Details'[value], DOUBLE)
)
)
JemmaD
2 years agoHelper V
I found a data type column, so i've actually used M Query conditional columns to create separate columns for the different data types. Then my measures can work independently. Thanks!