cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

## Create a new row based on the comparison of 2 previous rows

Hi,

I have the following dataset :

In PBI :
Lines = Personne then a Project granularity (blacked fields)
Columns = none

Values = Each months + the two last columns in the matrix above

I have several persons (red fields), for each of them I have the number of days they worked on different projects they have been affected to (the blacked fields).
In last two rows, I have the number of days that they should have attended on a given month (named Nombre de jours attendu) and the sum of days on all the project they have been working on (named Total).

I would like to add a new row for each person, comparing the value of the "Total" row and the "Nombre de jours attendu" row.
Then, I'll implement a color rules, where negative fields will be red so I know when someone hasn't filled his sheet properly.

Thanks for the help !

1 ACCEPTED SOLUTION
Employee

Hi @Zoko,

Please check the demo in the attachment. Though there are many steps, it works.

All the steps are applied in the Query Editor.

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Employee

Hi @Zoko,

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Employee

Hi @Zoko,

As far as I know, I'm afraid we can't add a custom row in the rows of a Matrix. Can you share the original data? A dummy one is enough. Maybe we can find a workaround.

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

Hi @v-jiascu-msft,

My data comes from a folder having 30 excel files of the different persons working in the company on various projects, one excel file looks like this :

 Project name Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre Nb de jours depuis le début de l'année Nb jours estimé sur l'année GreatProjectName1 9,5 16 16,5 11 8 14 75,00 153,00 GreatProjectName2 5 2 2 3 2,5 3 17,50 30,00 Congés ou autre absence 7,5 2 3,5 5 7,5 4 29,50 0,00 Total 14,5 18 18,5 14 10,5 17 0 0 0 0 0 0 92,5 183 Nombre de jours attendu 22 20 22 19 18 21 22 22 20 23 20 18 247

Adding a custom row in Power BI would be equal to adding a new column to this table (and by extension to all the excel files).
However I can't change the template of these documents.

Employee

Hi @Zoko,

Please check the demo in the attachment. Though there are many steps, it works.

All the steps are applied in the Query Editor.

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors