Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
Zoko
Frequent Visitor

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

Hi,

I have the following dataset :

 

pbihelp.png

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 ! Smiley Happy

1 ACCEPTED SOLUTION

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.

Create_a_new_row_based_on_the_comparison_of_2_previous_rows

 

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.

View solution in original post

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @Zoko,

 

Could you please mark the proper answers as solutions?

 

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.
v-jiascu-msft
Employee
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.

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 nameJanvierFévrierMarsAvrilMaiJuinJuilletAoûtSeptembreOctobreNovembreDécembreNb de jours depuis le début de l'annéeNb jours estimé sur l'année
GreatProjectName19,51616,511814      75,00153,00
GreatProjectName252232,53      17,5030,00
Congés ou autre absence7,523,557,54      29,500,00
Total14,51818,51410,51700000092,5183
Nombre de jours attendu222022191821222220232018247 

 

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.

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.

Create_a_new_row_based_on_the_comparison_of_2_previous_rows

 

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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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