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
Julio9704
New Member

Help with relationships of a new date table

The thing is that I have to create a report with four different tables:

  • Agent: ID, Name, mail, boss, Hire Date
  • Ticket: Ticket ID, Created by ID (Agent's ID), Created Date, Country, Region, Earnings...
  • Surveys: ID, Parent Ticket (Ticket's ID), Response Date, Likert scale.
  • Quality: Email (Agent's mail), Evaluation Date, Score, Ticket (Ticket's ID).

 

I am asked to create a dropdown filter (slicer) with the format of "Month Year", i.e, September 2018. Nevertheless, I have different dates from each table (Hire Date, Created Date, Response Date and Evaluation Date are not the same, some tables even have more rows than others).

 

I guess that I have to create a date table, I did it with the following code (my first question is, is this ok?):

Dates =
VAR BaseTable = CALENDARAUTO()
Return
ADDCOLUMNS(
BaseTable,
"Month Year", FORMAT([Date], "mmmm yyyy"),
"Week Start date", [Date]-1*WEEKDAY([Date],1)+1,
"Week number", WEEKNUM([Date]),
"Year", FORMAT([Date],"YYYY"))
 

I want to show some indicators such as:

 

  1. the average of the evaluation score, number of quality evaluations
  2. The total earnings, number of sales (with Ticket table)
  3.  Market reached percentage and Net promoter score (With Survey tables)
  4. Total tickets (Ticket table) and NPS (Survey table) by ticket origin (Ticket table).

 

With the above information, I want to know how to create the data model/relationships, I did the following model:

 

image.png

 

As you can see, I can't set the relationships Dates-Tickets and Dates-Quality as active, so, whenever I select the slicer as "April 2018", it does not show the Evaluation Score (from Quality) of that month, instead, it shows the Score of all the data.

 

How can I solve this?

 

 

 

 

3 REPLIES 3
amitchandak
Super User
Super User

@Julio9704 , Do not join ticket or quality.

or

1. Create one merge table ticket or quality and use that.

2. Same as above use this new table and ticket table

3. same as 2. but have one common dimension between new table and ticket table

 

These will make a star schema and you will be able to work

Sorry for a basic question, what tables should I merge in step 1?

@Julio9704 , Combined = tickets and quality (merge https://radacad.com/append-vs-merge-in-power-bi-and-power-query) 

1. Keep one if it solve purpose

2. Keep combined  and tickets

3. Keep combined  and tickets  and common dimension like ticket

4. combined  and ticket  will join to date as fact

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.