Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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] ) ) ),
BLANK( ),
VALUE( SUM( 'Spreadsheet Cell'[Value] ) )
)
However, it is giving this error:
The above formula works if I replace SUM with MAX (but only gives the max value, I am interested in getting the SUM).
Any help with this is appreciated. Thanks!
Solved! Go to Solution.
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 ) ) )
)
)
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 ) ) )
)
)
Hi, thanks a lot for helping with this. This is working!
Hi @Khurram_Ahmed,
Please try this:
IF(
ISNUMBER( SUM( 'Spreadsheet Cell'[Value] ) ),
SUM( 'Spreadsheet Cell'[Value] ),
BLANK()
)
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
66 | |
62 | |
52 | |
36 | |
34 |
User | Count |
---|---|
78 | |
66 | |
58 | |
45 | |
43 |