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
CJ_96601
Helper V
Helper V

DATA MODEL

Hello, 

 

I have 4 facts table and have this model as follows:

 

  Table 1                                     

  Key Index

     - Emp No

     - Hire Date

     - Termination Date

 

Table 2

Key Index

   - Emp No

   - Date

 

Table 3

Key Index

   - Emp No

   - Date

 

Table 3

Key Index

   - Emp No

   - Date

 

Calendar

  - Date

 

below is the diagram for easy understanding.

 

 

Design.JPG

 

My question is how can i link table 2 [date] , table 3 [date]  and table 4 [date]  to calendar[date] keeping star schema model.   

 

Or is there a way to do measure keeping table 1 related to calendar and not table 2,3 and 4?

 

Thanks for your help.

 

Regards, 

 

 

11 REPLIES 11
jstorm
Resolver III
Resolver III

Post a screenshot of your 'Model' tab in Power BI.

camargos88
Community Champion
Community Champion

Hi @CJ_96601 ,

 

Can't you just use 1 Emp table (append them)... 

Also, why do you need those 3 tables, once you have the data on table 1 ?

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hello @camargos88

 

Thank you for your response.

 

Tables are from our ERP via ODBC.    I tried append but refresh takes forever.

 

Is there any other solution, until append is fix.

 

Regards, 

 

 

 

 

 

 

@CJ_96601 ,

 

Are you using import or direct query ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88,

 

can you elaborate, please

@CJ_96601 ,

 

Why don't you submit a query to your source like:

TABLE 1 UNION ALL TABLE 2 UNION ALL TABLE 3....

 

Also, check this link, maybe it's gonna help with your model:

 

https://radacad.com/directquery-live-connection-or-import-data-tough-decision

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88 

 

It is not that easy...considering how oracle is .

 

thanks for the link.  

@camargos88 

 

On another note, i know this is not related to my previous question, please refer to the screen shot below:

 

Capture.JPG

 

Why bar graph ended up that way , when using below measure?

 

 

  CALCULATE(DISTINCTCOUNT(ODBC[EMPNO])+0,
USERELATIONSHIP(ODBC[TERMDATE], 'Calendar'[Date]),
not(ISBLANK(ODBC[TERMDATE])+0),

ODBC[REASON]="TRANSF") - // THIS SUPPOSE TO FILTER
 
Secondly, can i use "<= CALENDAR[DATE]" with the above measure?
 
Regards,
 
 


@CJ_96601 ,

 

It looks like a problem with your model design, check the table connections.

Would help if you post how you are connections those tables. But try to be simple with the model, redesign it with the append ou union.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@CJ_96601 ,

 

Once you have the queries, you can go to Advanced Mode e write your custom query:

 

 

 directquery_sqlserverdb.png



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88 

 

I will try this once things get back to normal and revert.

 

I have no VPN at the moment and lockdown is in place...

 

Thanks

 

 

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.