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
Anonymous
Not applicable

How to filter dates in one table based on selections from other

Hi PowerBi Community,

 

I have a many tables and relationships, but to summarize my problem - 

Table A

ObjectDateCt
A1-Jan5
A3-Jan10
A5-Jan15
B2-Jan1
B5-Jan2
B7-Jan3

 

Table B

ObjectDateStatus
A1-Jan1
A2-Jan1
A3-Jan0
A4-Jan0
A5-Jan1
B2-Jan1
B3-Jan1
B4-Jan1
B5-Jan1
B6-Jan0
B7-Jan0

the dates here will always

- be on a daily level

- have the start and end date according to the min and max date in table A according to each object

Table A and B have a relationship based on object column -

kmpbi_0-1632229790461.png

 

 

I have two visualizations, for table A and B, and the goal for me is to ensure both display for the same timeperiod.

 

kmpbi_2-1632195638889.png

NOTE: there are a few other slicers on the visual as well, which I would like to keep as is.

 

I have tried a few different approaches but none of them have worked out for me 😞 

 

- I have tried to add an intermediate date dimension table. This filters the both visuals on the correct dates, but then I am not able to pull the count of status for the correct objects.

- I have tried to use SELECTEDVALUES, VALUES, ALLEXCEPT but none of them have yielded correct results for me.

 

Any help with this is much appreciated! Thank you in advance!

 

2 REPLIES 2
Greg_Deckler
Super User
Super User

@Anonymous Are those tables related and if so on what column?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler , they are related on the Object column

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.