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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MarcUrdang
Post Patron
Post Patron

using data from two sources

I have one field in one data source that is simply text: the name of the day .. ie Monday etc.

There is another field that is a calculation using a date (two actually) and turns it into that dates day name.. ie Monday.

 

I want to create a calc that says:  If(and(field1)=(field2),"y","n"

However I cannot use them in the same calc ... 

 

https://drive.google.com/open?id=1RIXxBw5SVvwbMGa4x5GQpftFLJGNpvPS

 

My two sources seem to be joined correctly. In Tableua this is so easy but in Power BI I seem to be struggling?

 

 

 

Any thoughts?

3 REPLIES 3
TomMartens
Super User
Super User

Hey,

 

can you please confirm that the relationship between the both tables is really a many to many relationship.

If this will be the case, then you have to be aware that each row of each table might relate to many rows in the related table.

This will create ambigious results for the same relationship, I'm wondering how Tableau is solvin this (meaning the underlying logic).

 

Nevertheless,  I created a calculated column inside the table "Carrier Info" using this DAX:

check weekday = 
IF('Carrier Info'[Names Sailing day] in CALCULATETABLE(values('Consol INBOUND'[Weekday FLL ETD ATD]) , RELATEDTABLE('Consol INBOUND')) , "Yes" , "No") 

The result looks like this:

image.png

 

Maybe this will create what you are looking fro, but please check the result on a larger dataset.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

HI again Tom .. can you show me how to do this at a CONSOL ID level .. in other words every Consol ID number is unique and is asigned a particular vessel/voyage number. Depending on which port of origin/shipping line/month (as per the secondary data source) would determine the Name Sailing Day which is then compared to the actual sailing date (day) in the main data source (consol Inbound)

 

thanks
Marc

Hi Tom

 

I would normally use a LOD (Level of Detail) in Tableau .. ie I would specify excatly at what level I want the data managed.

 

I used your calc, thank you very much. ... but if you bring the calc into my example in the link I sent you get 

 

Monday Sauturday - No

Thursday Thursday - Yes

Monday Thursday - Yes .. which is not correct .. I guess I will need to specify a level of detail in PBI as well.... its just that I'm starting out in PBI so only learning the ropes.

 

any other thoughts?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.