- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Freezing HIstorical Mapping
I have a well formatted and functioning P&L Power BI report. Our account hierarchy is stored in an excel workbook in a table. We have occasional changes to the hierarchy, e.g. moving an account from SG&A to COGS, etc. When this happens, the historical transactions from previous years also moves. I expected this, however, my leadership would like the historical transactions to remain in the original hierarchy. So if account 1234 was in SG&A->Rent->Insurance in 2024 and is moved to COGS->Rent->Insurance for 2025, they would like 2024 to remain in SG&A->Rent->Insurance. Is there a feasible way of doing this? The hierarchy is pulled over in Rows section of the Visualization panel. Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @trathman
Power BI retrieves data from the sourceand any updates made to the source will be reflected in the model after a successful refresh. However, if there are changes to dimension attributes that need to be retained over time, these changes must be tracked and stored. This requires maintaining historical records, including when each change occurred and when it ended. Without such tracking, a refresh would overwrite previous values, making it impossible to analyze historical trends or compare past states of the data.
Dane Belarmino | Microsoft MVP | Proud to be a Super User!
Did I answer your question? Mark my post as a solution!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@trathman Create DAX measures to dynamically select the correct hierarchy version
Create a table in Excel or directly in Power BI with columns like:
AccountID
HierarchyLevel1
HierarchyLevel2
HierarchyLevel3
EffectiveStartDate
EffectiveEndDate
Import this table into Power BI.
In the Power BI data model, create a relationship between your transaction data and the versioned hierarchy table based on the AccountID. Additionally, use the transaction date to filter the hierarchy version.
DAX
SelectedHierarchy =
VAR TransactionDate = SELECTEDVALUE('Transactions'[TransactionDate])
RETURN
CALCULATE(
MAX('Hierarchy'[HierarchyLevel1]),
FILTER(
'Hierarchy',
'Hierarchy'[AccountID] = SELECTEDVALUE('Transactions'[AccountID]) &&
'Hierarchy'[EffectiveStartDate] <= TransactionDate &&
'Hierarchy'[EffectiveEndDate] >= TransactionDate
)
)
Use these DAX measures in your report to display the correct hierarchy based on the transaction date.
Proud to be a Super User! |
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for the above. I already have a Many:1 relationship between GLJournal and DIM_Account based on the account number. I am a little confused on how to apply "SelectedHierarchy" in Power BI. I am currently using the Matrix visual with month running across the top:
My hierarchy is structured as:
Would the "SelectedHierarchy" be a piece of my "Total Amount Balance USD Actual" measure?
VAR CalcType = SELECTEDVALUE(DIM_Header[CalcType])

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
01-26-2025 08:48 AM | |||
12-28-2021 02:51 AM | |||
06-02-2020 03:43 AM | |||
02-04-2025 07:43 AM | |||
11-12-2024 12:34 PM |
User | Count |
---|---|
86 | |
81 | |
54 | |
39 | |
37 |
User | Count |
---|---|
105 | |
85 | |
48 | |
42 | |
41 |