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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
nirrobi
Helper V
Helper V

Can not create visual (table) from 2 related table that connect properly (I think)

Hi all,

 

I face strange situation,

 

I have table for invoices and table for arrival date (both have date column as it not the same date),

I want to create visual (table) that shows the sales id , date of arrival and date of invoice (afterward will create diffrence between those 2 dates) but get error from Power BI Desktop (seems like connection issue).

 

if I try to connect for example, sales id count of item and sum of invoice it work perfectly (exactly the same tables but diffrent colmn, hence I assume the connection is well configure)

 

Can anyone think of any solution.

 

Many thanks in advance.

 

Nir

1 ACCEPTED SOLUTION

@nirrobi

 

Based on my test, the problem is caused by the relationship among tables. If the relationship is 1:1,1:1 among the three tables, the original table visual in your pbix would work.

In your case(many:1,many:1), use two measures instead.

MAX INV DATE = MAX(INVOICES[INV DATE])
MIN SALES DATE = MIN(SALES[SALES DATE])


Capture.PNG

If you have any question, feel free to let me know.

View solution in original post

13 REPLIES 13
Sean
Community Champion
Community Champion

@nirrobi Can you post some sample data of your tables?

 

So we can see how the tables are organized and how they are related?

 

Also do you have a Calendar table?

Sure,

Hope it will help.

 

I have one table for invoices (with duplicate), one table for sales (with duplicate).

and I create in power bi desktop append query with remove duplicate.

then I try to connect the sales ID with date of invoice and date of sale and got the attached error

 

 

 

ERROR.JPG

 

thanks.

 

DATA.JPGRELARIONSHIP.JPG

@nirrobi

Regarding the error in the picture, the documentation online says

  • You are trying to use two or more fields from tables that are not related. You need to remove the unrelated fields from the visual and then create a relationship between the tables. Once you have done this, you can add the fields back to the visual. This can be done in Power BI Desktop or Power Pivot for Excel. Learn more

Please try to follow the above recommendation.

 

By the way, how do you append query with remove dulicate? And why do you connect those tables via date columns? Based on my understanding, those tables are linked by the SALESID.

@Eric_Zhang

 

thanks for your reply.

 

I read the documantation but no help. I think is not my case.

 

append query - yes with remove duplicate else it not working.

conncection is indeed sales ID to sales ID to sale id no date in the relation ship.

 

I try to make table of sales id -sales date - inv date

@nirrobi

 

Is it possible for you to upload the pbix?

i try but not find where I can uplod pbix file, can you help please.

 

many thanks.

You can upload an attachment when replying.

Capture.PNG

sorry.

 

I can't find it :-((((Capture.JPG

 

only pic as attached

@nirrobi

 

Can you upload using any web storage service? as I know that there're various free trials.

@nirrobi

 

Based on my test, the problem is caused by the relationship among tables. If the relationship is 1:1,1:1 among the three tables, the original table visual in your pbix would work.

In your case(many:1,many:1), use two measures instead.

MAX INV DATE = MAX(INVOICES[INV DATE])
MIN SALES DATE = MIN(SALES[SALES DATE])


Capture.PNG

If you have any question, feel free to let me know.

check and work like a charm!!!

 

many thanks.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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