Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Skip Sum Computation when Power BI interprets column as string

We are working with a live connection (to an Excel sheet) which makes it impossible to modify the data, I tried my best to clean up the source. I have the problem, that I have an empty column which i...
  • Sahir_Maharaj's avatar
    3 years ago

    Hello Anonymous,

     

    Can you please try:

     

    1. Convert Strings to Numbers

    New Total = 
    IF (
        COUNT(List_A[Column A]) < 1,
        0,
        SUMX(List_A, VALUE(List_A[Column A]))
    )

     

    2. Handle Non-Numeric Values

    New Total = 
    IF (
        COUNT(List_A[Column A]) < 1,
        0,
        SUMX(List_A, IF(ISNUMBER(VALUE(List_A[Column A])), VALUE(List_A[Column A]), 0))
    )

     

    Should you require further assistance, please do not hesitate to reach out to me.