Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Snowy34
Helper III
Helper III

Multiple relationships issue and help required

Good day all,

 

I have been building a simple dashboard I have a Master Locations table that holds all locations for each warehouse, the report will basically look at all used locations within CUR0015 report and give us some information.

 

The problem I got is Master Location table has sites and locations that I would like to link to CUR-0015 report and right now I only have locations linked and I can't get the site to link up meaning my visuals are all wrong.

 

This is my working report that does not have the SITE functions hooked up and the data in CUR-0015 only has one site in it so everything calculates fine

bn7xUHp

 

Below is what happens when I include different site data within CUR0015 and Master Locations. The visual is all over the place and adding a slicer doesn't fix the issue 😞 

 

B30sDYI

 

Any help with this would be great as I would like to have each site on one visual dashboard but if this can't be done then 5 different site-specific dashboards will have to do.

 

Regards 

1 ACCEPTED SOLUTION

@Snowy34  is there any chance you can share the data, i find it easier to work it out if its in front of me, but i think you might need to use a filter rather than in

 

try this

 

Used Prime Shelf =
CALCULATE (
    COUNTA ( 'CUR-0015'[location] ),
    FILTER ( 'Master Locations', 'Master Locations'[Type] = "Prime - Shelf" )
)




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

@Snowy34  finding it a little difficult to understand what you have here, can you show the table structure and relationships and demonstrate what you expecting?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Good day @vanessafvg 

 

So the Location count by type in the second screenshot is wrong, it's counting all sites when it should only count Site 400 in this case as per screenshot 1 even when I add a Site Slicer. Without the slicer, it just adds everything together and ever is right but its, when I try to check each individual sites the Location Count by Type, is right but the rest is all wrong.

 

I'm using this to get my location count 

 

Location Count by Type

Prime Shelf =
CALCULATE(COUNTA('Master Locations'[Type]), 'Master Locations'[Type] IN { "Prime - Shelf" })
 
Used Locations by Type
Used Prime Shelf =
CALCULATE(
    COUNTA('CUR-0015'[location]),
    'Master Locations'[Type] IN { "Prime - Shelf" }
)
 
Free Locations by Type
Free Prime Shelfs =
[Prime Shelf] - [Used Prime Shelf]
 
relationships as requested, that inactive relationships from Master Location to CUR is site relationships but it's not active and I can't get it to work without that my guess is.
D9r19S0

 

@Snowy34  is there any chance you can share the data, i find it easier to work it out if its in front of me, but i think you might need to use a filter rather than in

 

try this

 

Used Prime Shelf =
CALCULATE (
    COUNTA ( 'CUR-0015'[location] ),
    FILTER ( 'Master Locations', 'Master Locations'[Type] = "Prime - Shelf" )
)




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.