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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Yrstruly2021
Helper V
Helper V

Data Modeling - Date Table

I have this data: https://drive.google.com/file/d/1aHULztI9Q0Ho7ffoRcBceAiElOTIZVji/view?usp=sharing

I need to create a connection between the Pholidays table and the rest of the tables. Please advise me how to create this connectionn?

1 ACCEPTED SOLUTION

Hi,

Write this calculated column formula in the Date Table

Column = LOOKUPVALUE('PHolidays (2)'[Public Holiday],'PHolidays (2)'[Date],'Date'[Date])

Now ensure that all your tables are connected only to the Date Table.  Whenever you want to view any information by Public Holidays, drag that column from the Date Table (not from the PHolidays table).

Hope this helps.

Untitled.png 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Yrstruly2021
Helper V
Helper V

Hi,

Though it may not matter, please change the Cardinality and Cross filter direction to Many to One and Single.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

You should create a Calendar Table first.  Using the LOOKUPVALUE() function, bring over the Holidays from the PHolidays table to the Calendar Table.  The Calendar Table should have a relationship with the other tables.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I created relationships to my tables. It does not display when a try and create a visualisation with different measures in powerbi? see: https://drive.google.com/file/d/1CBpFLkw37E5aeYSG9RXMLTzOXUCdcn4m/view?usp=sharing and https://drive.google.com/file/d/1n6oJToedcG0lfh06Xq2RO5j1l-3pUYeR/view?usp=sharing 

Hi,

Write this calculated column formula in the Date Table

Column = LOOKUPVALUE('PHolidays (2)'[Public Holiday],'PHolidays (2)'[Date],'Date'[Date])

Now ensure that all your tables are connected only to the Date Table.  Whenever you want to view any information by Public Holidays, drag that column from the Date Table (not from the PHolidays table).

Hope this helps.

Untitled.png 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks, can you send me the pbix?

I have not kept the PBI file.  Just write the calculated column formula as mentioned in my previous message.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.