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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
daniel_baciu
Helper I
Helper I

Update database column content

Hello,

 

I am trying to get a solution for the following topic. I have a rolling database and want to highlight changes from a period to another period. Sample table below (2 heads and 3 periods for simplicity):

2023-12-13 12_21_01-Untitled - Power Query Editor.png

Every period there is a new database which is automatically uploaded from Sharepoint in a specific date in a month and appended to the existing database in PBI. 

One head is changing the Allocation and the Reason for Change in P03. I need to highlight this change when comparing P03 with P02 and P03 with P01 (user is chosing which periods they want to compare).

 

Below is the sample of relations i have. I created 2 referenced tables from Database: one for T0 one for T1. Nothing else much to say.

2023-12-13 12_26_48-Untitled - Power BI Desktop.png

 

Below is the summary of changes i managed to put together (2 slicers one from T0 database the other from T1 database) and i created a measure ("Changes") with a simple mathematical substract calculation (Allocation from T1 - Allocation from T0):

2023-12-13 12_23_23-Untitled - Power BI Desktop.png

 

All works fine except one most important thing: the Reason for Change. As we see, PBI sees that there is -1 in P03 vs P02, but the reason of change that he recognises is "Addition", while i want it to be "Left Company".

I understood why this happen (below is the obvious logic split by period), as it takes the reason for change for the same item "Addition" which has the values; since "left company" was 0 in all periods, the result is also zero...

2023-12-13 13_27_41-Book19 - Excel.png

 

Now... the solution i think is needed in this case is to show the most updated reason for change that gets updated only with the P03 database (and ideally to consider the reason for change from the period selected in T1 slicer...). When they take out the head, they also update his reason for change, so in P03 they made him 0 and updated his reason for change to "Left Company". You could argue that showing a -1 in "Addition", it is obvious that is a reduction, and yes, it is, but there are multiple reasons for decreasing a head such as "left company", "transfer". "correction", "restructuring" etc. and i would like to highlight them for a more meaningful data...

Does anyone have a solution for this?

Pbix is saved here: https://drive.google.com/file/d/1FmB6yAujOc6SBkAKwgM2VCYgZeHbRC3_/view?usp=drive_link

Thanks!

1 REPLY 1
lbendlin
Super User
Super User

Power BI has no memory. You need to record these data points further upstream.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors