Forum Discussion
Khurram_Ahmed
2 years agoFrequent Visitor
Can't use SUM with VALUE function
I am trying to use a measure to first check if a column has numeric values and only then sum those values. Here is my code: IF(
ISERROR( VALUE( SUM( 'Spreadsheet Cell'[Value] ) ) ),
...
- 2 years ago
Can you try this Khurram_Ahmed
MEASURE = CALCULATE ( SUMX ( ADDCOLUMNS ( 'Table', "@double", CONVERT ( 'Table'[Column1], DOUBLE ) ), [@double] ), FILTER ( VALUES ( 'Table'[Column1] ), NOT ( ISERROR ( CONVERT ( 'Table'[Column1], DOUBLE ) ) ) ) )
smpa01
2 years agoCommunity Champion
Can you try this Khurram_Ahmed
MEASURE =
CALCULATE (
SUMX (
ADDCOLUMNS ( 'Table', "@double", CONVERT ( 'Table'[Column1], DOUBLE ) ),
[@double]
),
FILTER (
VALUES ( 'Table'[Column1] ),
NOT ( ISERROR ( CONVERT ( 'Table'[Column1], DOUBLE ) ) )
)
)
- Khurram_Ahmed2 years agoFrequent Visitor
Hi, thanks a lot for helping with this. This is working!