Forum Discussion
Data Modeling (Relationship issue)
Hello Brent_LaCorte
Its the calculated column added to the data table to get the Associate and Shop relationship working in the model.
In the original data, you can also add this column in using the following dax function and create an inactive relationship, in the data model.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and I would love to see your like.
Regards
Kumail Raza
Kumail I see! You forced Power BI to add the column there. I was able to replicate in Excel through the data model and that does indeed work.
A caveat though. If I wanted a broader solution... for instance the heirarchy goes up to Manager and Director levels. Would I then have to create the same functions and add their names to the data set that way? Is there another way to make it flow that I only need to use the heirarchy for the splicers or will I need to create multiple functions for the multiple data sets that I am analyzing?
- Kumail5 years agoImpactful Individual
As you requested initially, it is getting filtered by shop dimension through Supervisor filter.
Thats getting a bit complicated..
You can create a measure that filters data by Hierarchy dimension with supervisor category where you select Shop dimension with supervisor category in filter.
measure = CALCULATE(SUM(data[Amount]), RELATEDTABLE(shop_list))If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and I would love to see your like.
Regards
Kumail Raza
- Kumail5 years agoImpactful Individual
Hello Brent_LaCorte
It is because Joe and Jim have transaction data from Shop # 3 and Shop # 4 .
If you remove incorrect data from data table, things would look more relevant.
Hope this helps.
Regards
Kumail Raza
- Brent_LaCorte5 years agoNew Member
The data itself isn't incorrect as sometimes Jim and Joe may have a transaction at those shops but they aren't on Craig's team so the numbers shouldn't be applied to Craig. The data is still relevant at a higher level, Manager for example, but looking specifically at the Supervisor team if the associate isn't on that supervisors team it needs to be filtered out and I am trying to do that without having a million slicers.