# How do I add values on nodes in two files

**URL:** https://discourse.paraview.org/t/how-do-i-add-values-on-nodes-in-two-files/12677
**Category:** ParaView Support
**Created:** [August 10, 2023, 1:58pm UTC](https://discourse.paraview.org/t/how-do-i-add-values-on-nodes-in-two-files/12677 "2023-08-10T13:58:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ss780060872](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ss780060872/32/12192_2.png) [@ss780060872](https://discourse.paraview.org/u/ss780060872)
#### Post date: [August 10, 2023, 1:58pm UTC](https://discourse.paraview.org/t/how-do-i-add-values-on-nodes-in-two-files/12677/1 "2023-08-10T13:58:28Z")

</div>

Hello everyone, I have solved two XDMFFile files through fenics, and the two-dimensional grids in these two files are the same. I want to merge the two files into one, that is, the sum of the two. How can I achieve this idea?  
Thank you so much!

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [August 10, 2023, 2:21pm UTC](https://discourse.paraview.org/t/how-do-i-add-values-on-nodes-in-two-files/12677/2 "2023-08-10T14:21:47Z")

</div>

Since the grids are the same, I presume by merging, you mean you want to merge the data arrays. If the two meshes are exactly the same, then you can use **Append Attributes**. Open both files in ParaView. Then select both of them in the `Pipeline Browser` and create the **Append Attributes** filter and hit `Apply`. The output will include data array from both inputs.

---

<div class="post-metadata">

### Author: ![ss780060872](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ss780060872/32/12192_2.png) [@ss780060872](https://discourse.paraview.org/u/ss780060872)
#### Post date: [August 11, 2023, 3:23am UTC](https://discourse.paraview.org/t/how-do-i-add-values-on-nodes-in-two-files/12677/3 "2023-08-11T03:23:03Z")

</div>

Thank you for your answer, this can combine the two files into one, the next question is, I want to sum each node value of the two separately, so as to get the cloud image and color bar after the addition, how do I achieve?

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [August 11, 2023, 11:45am UTC](https://discourse.paraview.org/t/how-do-i-add-values-on-nodes-in-two-files/12677/4 "2023-08-11T11:45:27Z")

</div>

Try applying the **Calculator** filter next. In the expression, you can specify the variable names to add e.g. `var1 + var2`. The sum per element will be saved in an array named `Result`. You can change the name of the result array on the `Properties` panel for the **Calculator** filter.
