Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi. I have 3 tables:
A) Transactional data: Month - Country - ID
B) Capacity: Month - Resources - Country
C) Consumption: Month - Hours - ID
In Table 1 month and country can appear more than once, but ID is unique
In Table 2 every month appears once per country (basically each country appears 12 times to reflect the capacity per month)
In table 3 ID appears once, as indicates how many hours each ID is consuming
I need to show per country the consumption vs the capacity. I'm struggling on the relationships. Can anyone give me a hint? I understand I need to build multiple relationships, but I'm not sure how.
Thanks
Ezequiel
Hi @amitchandak . Your solution seems to work but I just realized I don't have Month in the consumption table, just ID. What would be the solution in that case? Thanks again,
Hi @ezequiel ,
You can refer the method in the following links to create the proper relationship. If they are not applicable for your scenario, please share some sample data in your model and final expected result in order to provide a suitable solution.
Creating Relationship Based on Multiple Fields in Power BI Using TREATAS DAX Function
Create a relationship with multiple columns in Power BI
Relationship in Power BI with Multiple Columns
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.
@ezequiel , Create new columns as suggested below and join
Consumption
C1 = [Month] & " " & [ID]
Transactional data: Month - Country - ID
C1 = [Month] & " " & [ID] // Join with C1 of Consumption
C2 = [Month] & " " & [Country] // Join with C2 of Capacity
Capacity: Month - Resources - Country
C2 = [Month] & " " & [Country]
If you make relationship like below:
Capacity[Country] to Transaction[Country]
Transaction[ID] to Consumption[ID]
Use Country field from Transaction while dragging to table or visual for dimension.
If above doesn't work, please share the dummy data.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |