Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Each year we carry out a pull of data from our grounds system that shows all the assets, whether they are in contract or not, if they are marked as live or dead, and the size of the asset.
I now have two tables Assets_2022 and Assets_2023 and they have the following columns in both:
Central_Asset_ID (a primary key that is unique to the asset)
Site Classification
Feature Code
Feature Name
In Contract
Live/Dead
Quantity
I am trying to create a table visualisation in Power BI that shows the following
Central Asset ID | Feature Code | Feature Name | Asset_2022 In Contract | Asset_2022 Live/Dead | Asset_2022 Quantity | Asset_2023 In Contract | Asset_2023 Live/Dead | Asset_2023 Quantity
The problem we have is that if an asset is present in 2023 and not in 2022 it isn't showing in the table.
Likewise we also want to create a slicer to filter the table on the feature name, however if we select Feature Name from the Asset_2023 table it won't show any assets of that type in the Asset_2022 table.
I've looked at merging queries so that I can get a full outer join but this hasn't solved the issue either.
What I am after is a list that says these are all the assets in 2023 and this is what the same asset (based on Central Asset ID) was in 2022 but I'm going round in circles!
A star schema should solve the issue. Create a dimension table for each field that you want to filter on (Year, Feature Name, etc.). You can do this in Power Query or a DAX calculated table. The dimension tables should contain distinct values for the field they contain (e.g., one row per Feature Name). Then create a 1:* relationship between each dimension table and fact table. You can add the Year field to each fact table (Asset_2022, Asset_2023) so you can join it to the Year dimension table. Be sure to use fields from the dimension tables in your visuals (measures like Quantity would come from the fact tables).
Proud to be a Super User!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
92 | |
89 | |
35 | |
35 |
User | Count |
---|---|
153 | |
99 | |
82 | |
63 | |
54 |