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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Timmo1016
Regular Visitor

Help with Table relationships

Hello,

 

I am currently working on a project that aims to visualize ticketing data for our firm (tickets per 1000 employees)

 

I have two datasets - Ticketing data and headcount data

 

Ticketing data has a Region Field and a Date Field

Headcount Data has a Region Field and a Date field

 

I created a unique regions table, and related both tables to it. That relationship works and I can see the # of tickets/1000 employees by region.

 

however, I want to show this data over time by quarter.

 

So I created a calendar table, and tried to relate both my datasets to it, but I am getting an ambiguity error. I am fairly new to doing this in powerBI. I can accomplish it relatively easily in Tableau, so I am just wondering where I am going wrong.

 

Any help would be appreciated!!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi all, thanks for the quick reply, I'll add more.

Hi @Timmo1016 ,

A situation like this?

vzhouwenmsft_0-1728267727429.png

Please change the data type of the 'Date' column to Date

vzhouwenmsft_1-1728267810450.png

vzhouwenmsft_2-1728267842622.png

 


Best Regards,
Wenbin Zhou

View solution in original post

9 REPLIES 9
parry2k
Super User
Super User

@Timmo1016 there are couple of ways, preference would be change the data type to date of this column in the PQ (Transform data) but if for some reason you also need the datetime column, then extract date from this column, and add a new column in PQ

 

Date.From([Existing Date Time Column])


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Timmo1016 also you don't need to use the userelationship function because all the relationships are active, userelationship is only used to make inactive relationships to active. If interested to know more about this here USERELATIONSHIP function (DAX) - DAX | Microsoft Learn



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Timmo1016 only reason it would happen if the values in the date table doesn't match the values in the transactional table. Can you make sure there is no time value in the transaction table? Check the data  preview in the transform data (power query).



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

It looks like there is a time value in the transaction tables. Can I get rid of them somehow?

Kedar_Pande
Super User
Super User

Ensure you have relationships set up with both the Ticketing and Headcount tables based on the Date fields with calendar table.

Set one of the relationships to be inactive (you can do this by selecting the relationship and toggling the "Active" setting).

 

TicketsPer1000Employees = 
CALCULATE(
SUM(Ticketing[TicketCount]),
USERELATIONSHIP(Ticketing[Date], Calendar[Date])
) / (SUM(Headcount[EmployeeCount]) / 1000)


When creating your visual, ensure you're using the calendar table's fields (like Quarter) to plot your data over time.

Ensure the date fields in both datasets and the calendar table are of the same data type (Date).

 

If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
www.linkedin.com/in/kedar-pande

Thank you for your response. I realized i don't really need the Region Relationship so this is much more simple now but I am still having trouble.

 

What I have now is 3 data tables, all of which have a relevant date column. I tried to create a calendar table to relate to each of them like below (key fields highlighted)

 

Timmo1016_1-1728066112893.png

But the visualizaiton seems to put everything as blank date if I use the date hierarchy from the calendar table i created.

 

Timmo1016_2-1728066167992.png

 

 

 

Anonymous
Not applicable

Hi all, thanks for the quick reply, I'll add more.

Hi @Timmo1016 ,

A situation like this?

vzhouwenmsft_0-1728267727429.png

Please change the data type of the 'Date' column to Date

vzhouwenmsft_1-1728267810450.png

vzhouwenmsft_2-1728267842622.png

 


Best Regards,
Wenbin Zhou

HotChilli
Super User
Super User

Please provide more details.

What's the error?

What does your relationship diagram look like?

Sample data?

Thank you for your reply. See my reply to Kedar above

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors