topic Sum multiple columns and ignore nulls in New to Qlik Sense
https://community.qlik.com/t5/New-to-Qlik-Sense/Sum-multiple-columns-and-ignore-nulls/m-p/1778421#M178583
<P>I want to sum multiple columns and ignore the null values.</P><P>I added the columns in a table and it looks like this. <STRONG>To be achieved</STRONG> is what I want to obtain</P><TABLE><TBODY><TR><TD>Name</TD><TD>Sale1</TD><TD>Sale2</TD><TD>Sale3</TD><TD>To be achieved</TD></TR><TR><TD>A</TD><TD>5</TD><TD>3</TD><TD>2</TD><TD>10</TD></TR><TR><TD>B</TD><TD>7</TD><TD>-</TD><TD>4</TD><TD>11</TD></TR><TR><TD>C</TD><TD>-</TD><TD>5</TD><TD>1</TD><TD>6</TD></TR><TR><TD>D</TD><TD>5</TD><TD>-</TD><TD>-</TD><TD>5</TD></TR></TBODY></TABLE><P> </P><P>I tried to apply sum ( {<Plain ={"*"}>}Sale1) but this does gives different results.</P><P>Is there a way to sum like Sale1 + Sale2 + Sale3 and ignore the nulls?</P><P>Or maybe it's better to do this from the load?</P><P>Thanks in advance</P>Fri, 29 Jan 2021 11:56:19 GMTCostinelRO2021-01-29T11:56:19ZSum multiple columns and ignore nulls
https://community.qlik.com/t5/New-to-Qlik-Sense/Sum-multiple-columns-and-ignore-nulls/m-p/1778421#M178583
<P>I want to sum multiple columns and ignore the null values.</P><P>I added the columns in a table and it looks like this. <STRONG>To be achieved</STRONG> is what I want to obtain</P><TABLE><TBODY><TR><TD>Name</TD><TD>Sale1</TD><TD>Sale2</TD><TD>Sale3</TD><TD>To be achieved</TD></TR><TR><TD>A</TD><TD>5</TD><TD>3</TD><TD>2</TD><TD>10</TD></TR><TR><TD>B</TD><TD>7</TD><TD>-</TD><TD>4</TD><TD>11</TD></TR><TR><TD>C</TD><TD>-</TD><TD>5</TD><TD>1</TD><TD>6</TD></TR><TR><TD>D</TD><TD>5</TD><TD>-</TD><TD>-</TD><TD>5</TD></TR></TBODY></TABLE><P> </P><P>I tried to apply sum ( {<Plain ={"*"}>}Sale1) but this does gives different results.</P><P>Is there a way to sum like Sale1 + Sale2 + Sale3 and ignore the nulls?</P><P>Or maybe it's better to do this from the load?</P><P>Thanks in advance</P>Fri, 29 Jan 2021 11:56:19 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Sum-multiple-columns-and-ignore-nulls/m-p/1778421#M178583CostinelRO2021-01-29T11:56:19ZRe: Sum multiple columns and ignore nulls
https://community.qlik.com/t5/New-to-Qlik-Sense/Sum-multiple-columns-and-ignore-nulls/m-p/1778426#M178584
<P>Hi ! You can use: </P><P><SPAN>Alt(Sale1,0) + Alt(Sale2,0) + Alt(Sale3,0)</SPAN></P><P><SPAN>Regards, Fernando</SPAN></P>Fri, 29 Jan 2021 12:30:48 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Sum-multiple-columns-and-ignore-nulls/m-p/1778426#M178584Fernando_Fabregas2021-01-29T12:30:48Z