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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
al427
Regular Visitor

Date questions

Hello,

 

I have two tables that are linked to eachother by ID, they both have dates that are not 100% linked (some days missing for each month) which in result makes data not show up correctly when using date filter from either table1 or table2.

 

example of dates:

table1.date.pngtable2.date.png

(In this image, there are no similarity between them, but there are dates that can be found in table1 and table2)

 

How would you resolve this the easiest to get data from table1 and table2 without having two date filters?

 

thanks

 

2 ACCEPTED SOLUTIONS
Idrissshatila
Super User
Super User

Hello @al427 ,

 

create a dim date table that has all dates and link it to both tables then you can use it as a filter.

https://youtu.be/-jRNjXyyWI4?si=OuqzDgXaX6JOZsHB

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

v-xuxinyi-msft
Community Support
Community Support

Hi @al427 

 

Thanks for the reply from @Idrissshatila , please allow me to provide another insight:

 

I added an ID column to the data you gave and created the relationship.

 

Table1:

vxuxinyimsft_0-1714010104926.png

 

Table2:

vxuxinyimsft_1-1714010132116.png

 

vxuxinyimsft_3-1714010620294.png

 

Two approaches come to mind for your reference

 

The first approach:

 

1. Merge two tables together in Power Query

vxuxinyimsft_6-1714011113463.png

 

2. Expand column

vxuxinyimsft_7-1714011188078.png

 

3. Close & Apply

vxuxinyimsft_8-1714011287399.png

 

Result:

vxuxinyimsft_9-1714011424281.png

 

The second approach:

 

If you could use the ID column as a slicer, you could do this.

vxuxinyimsft_4-1714010791662.png

 

If this sample data is structurally different from the one you are using, please do not hesitate to mention it and I will modify it.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xuxinyi-msft
Community Support
Community Support

Hi @al427 

 

Thanks for the reply from @Idrissshatila , please allow me to provide another insight:

 

I added an ID column to the data you gave and created the relationship.

 

Table1:

vxuxinyimsft_0-1714010104926.png

 

Table2:

vxuxinyimsft_1-1714010132116.png

 

vxuxinyimsft_3-1714010620294.png

 

Two approaches come to mind for your reference

 

The first approach:

 

1. Merge two tables together in Power Query

vxuxinyimsft_6-1714011113463.png

 

2. Expand column

vxuxinyimsft_7-1714011188078.png

 

3. Close & Apply

vxuxinyimsft_8-1714011287399.png

 

Result:

vxuxinyimsft_9-1714011424281.png

 

The second approach:

 

If you could use the ID column as a slicer, you could do this.

vxuxinyimsft_4-1714010791662.png

 

If this sample data is structurally different from the one you are using, please do not hesitate to mention it and I will modify it.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Idrissshatila
Super User
Super User

Hello @al427 ,

 

create a dim date table that has all dates and link it to both tables then you can use it as a filter.

https://youtu.be/-jRNjXyyWI4?si=OuqzDgXaX6JOZsHB

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.