March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I have been a long time trying to achieve the following and I have not be able to do it.
Here is the model:
The dimensions may change over time and each yearmonth may have a different value. Asking for help about that in this forum they told me to stablish the relations like this so I can filter the dimensions. Thats works perfectly fine.
Then to be able to calculate in a pivot table the sum by concept I have this measure in order to be able to use the inactive relation:
Sum Value (Concept) = CALCULATE(SUM(Data[Value]),USERELATIONSHIP(Concepts[ConceptCode],Data[ConceptCode]))
That works fine when all the dimensions I want to see in the pivot table are of the concepts table:
But, and here it comes the issue that is giving me a huge headache..... If I want to see in the pivot table Concept grops and then Country name below, I am unable to do it:
There appear all the countries, in fact I get it, they have no relation active at that moment. I have tried using the fiollowing measure but it trhows an error due to ambigous relation and I end at the beginning point again:
Sum Value (Concept) = CALCULATE(SUM(Data[Value]),
USERELATIONSHIP(Concepts[ConceptCode],Data[ConceptCode]),
USERELATIONSHIP(Countries[CountryIso],Data[CountryIso])
)
Edit: attached the wrong .pbix, here is the correct one:
I delayed the implementation of this report and now I have a deadline soon to complete.
Any help is much apreciated,
Big thanks to all and regards,
Any recomentadion on how to achieve it?
Hi @Borja204
When one table filters another table, it is impossible to use two relationships at the same time. Power BI can only use one relationship to avoid ambiguous filtered result. If you want to activate the relationships 'Concepts' > 'Data' and 'Countries' > 'Data', there will be two active relationships between 'LoadReferences' and 'Data': 'LoadReferences' > 'Concepts' > 'Data' and 'LoadReferences' > 'Countries' > 'Data'. This is not allowed.
Although the three Dim tables 'Projects', 'Countries' and 'Concepts' are all changing over time, but I see they mainly change the names, while the relationships are built on IDs. If the same IDs represent the same objects regardless of what the names are, I suggest transforming the data to use only one name for each ID to reduce the number of time-changing Dim tables. Then modify the relationships between tables. Star schema is always recommended. At least the 'Countries' table could be switched to not time-changing as it will not change frequently.
Kindly let me know if this helps.
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
Hi @v-jingzhang ,
Thanks for your help. The model that I posted here was a small piece representing the real model. It is true that some of the dimensions could be non-changing but in my real model there are like 3 dimensions that changes, some of them represent a hierarchy so it is not only the name and thats why I wanted to learn how to manage it.
Indeed, one of the PowerBi projects repsesent only the last value of dimensions for each table (with a star schema as you suggested).
The problem comes with the other project (thats why I posted the model above) where I need to achieve the requeriment of being able to see the "reports" as they saw them one year ago. If they enter today to see a report in power bi with the dimensions of this year-month, they want the ability to select the year-month of the dimensions in order to be able to re-build the same report theyre seeing today but in the future (and unfortunately it is not only the name, also hierarchies, I posted a simple representation here in order to get some help as I said)
Thanks for your assiatance anyways,
Regards!
@Borja204 , They are inactive because the model will not work with those. They are not alternate active.
I think you need to use SCD implementation as explained by Guyinacube in this video
https://www.youtube.com/watch?v=tKeaQpWynzg
Hi again @amitchandak ,
I saw the video but it seems the problem is not resolved there neither. The example that appears in that video is one with one userelationship, is not combining 2 tables to display in a visual, ot at least, I dont get it... 😕
@amitchandak but there is no measure that can do that calc? like the use relation one above but for both tables
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |