Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
218 | |
88 | |
83 | |
65 | |
56 |