Forum Discussion
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
- ziyabikram96Helper V
if ([total] <> 0 , sum(columnA)+sum(columnB)+sum(ColumnC) , "NA")
- twister8889Helper 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:
category date location columanA columnB columnC Total
A 01012020
Loc1 NA A 01012020 Loc1 NA A
01012020
Loc1 0 0 0 NA A 01012020 Loc1 0 0 0 NA - AnonymousNot 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
- ziyabikram96Helper V
if ([total] <> BLANK() , sum(columnA)+sum(columnB)+sum(ColumnC) , "NA")
or try this