Forum Discussion

twister8889's avatar
twister8889
Helper V
5 years ago

SUM blank values

I have a sum a Total = sum(columnA)+sum(columnB)+sum(ColumnC). I have null values in some rows, so I would like to show N/A when is null

 

I'm trying to do IF( isblank(Total);"NA";Total)

The problem is, that I have rows with blank and NA, and others with 0 for columnA, ColumnB, ColumnC, and Total. I cant filter different of 0 because sometimes I can have 0 values of ColumnA,B, and C

 

 

4 Replies

    • twister8889's avatar
      twister8889
      Helper V

      Firts of all, thank you for your answer...

       

      The same error, maybe is the data model? Maybe I need to do the left/right merge queries?

      The result table is:

      categorydatelocationcolumanAcolumnBcolumnC

      Total

      A

      01012020

      Loc1   NA
      A01012020Loc1   NA

      A

      01012020

      Loc1000NA
      A01012020Loc1000NA


      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi twister8889 ,

        I'm still not sure what you need. Could you please provide me with the initial sample data in your model tables and your expected result with specific examples and calculation logic? Are the columns Category, Date, Location, Column A, Column B and Column C from the same table? What do you need to do if Column A, Column B and Column C have 0? Thank you. For example:

        Sample data in tables

        table 1

        Column A Column B Column C
        xx xx xx

        table 2

        Category Date Location
        xx xx xx

        Expected result:

        Column A Column B Column C Total
              NA
            0 0?

        Best Regards

  • if ([total] <> BLANK() , sum(columnA)+sum(columnB)+sum(ColumnC) , "NA")

    or try this