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
pedroccamaraDBI
Post Partisan
Post Partisan

Sum from a second lookup table

Hello all

I have my sales fact table, (1st) with all the values that i need. This fact table is connected to clients dimension table (2nd) and this one is also connected to another dimension table, (3rd) for cost center.
In my report i want to show my sales measure by cost center, i mean, total sales from the first table, using the cost center filter from the 3rd table, like this pic

Capture.JPG
Thanks a lot all of you
Best regards

Pedro

1 ACCEPTED SOLUTION

well there are several ways to do this

 

1. for the purposes you can use crossfilter which will allow you to  create the bidirectional relationships in a measure rather than in your active relationships.  bidirectional relationships generally are not recommended

https://radacad.com/dax-crossfilter-function-in-power-bi-write-the-formula-both-directional-but-keep...

2. you can denormalise the dimension tables into one table 

3. you can use bidirectional relationships but crossfilter would be better

 

if you able to share some dummy data i can mock it up





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

4 REPLIES 4
vanessafvg
Super User
Super User

so your relationships are all single directional ie your fact has a many to one relationship with 2nd table and 2nd table has a many to one relatonship with table 3?  

have you set this up already can you screen shot your relationships?

 

firstly what is the purpose of using table 3? using cc name?





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!




Hello @vanessafvg 
Thank you for your message and i'll try to answer you.
My relationships are both single direction. Like this picture and not the other above.
Capture.JPG
And the purpose of using table 3 is because at some point, i believe i'm gonna add another table to table 3 and also i need to use those fields with hierarchies.
Thansk a lot
Pedro

well there are several ways to do this

 

1. for the purposes you can use crossfilter which will allow you to  create the bidirectional relationships in a measure rather than in your active relationships.  bidirectional relationships generally are not recommended

https://radacad.com/dax-crossfilter-function-in-power-bi-write-the-formula-both-directional-but-keep...

2. you can denormalise the dimension tables into one table 

3. you can use bidirectional relationships but crossfilter would be better

 

if you able to share some dummy data i can mock it up





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!




Thank you so much @vanessafvg for your answer.

I believe i will keep it simple and option 2 will be better, for the purpose of adding another table in the future.
Best regards
Pedro

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.