cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Get data from a column by comparing the date in a different table

I have Combine2020 = column A: values are "Yes" and "No". Column B:"Created Date", Column C="ID".  
Table B: Has "Published date" and "ID"

ID is 1-many relationship from Table B to Table A.

This is what I have: Yes = CALCULATE(Count('Combine2020'[Is Useful?]),FILTER('Combine2020','Combine2020'[Is Useful?]="Yes"). This will give be count of "Yes" for unique ID.

"Is Useful?" has values of "Yes" an "No".

Now I want to modify the above calculation to get the count when the Created Date is before the Published date.

 

Thanks

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@Nita , Try like

CALCULATE(Count('Combine2020'[Is Useful?]),FILTER('Combine2020','Combine2020'[Is Useful?]="Yes" && 'Combine2020'[Created Date]<=related('Table B:'[Published date])))

 

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

@Nita , Try like

CALCULATE(Count('Combine2020'[Is Useful?]),FILTER('Combine2020','Combine2020'[Is Useful?]="Yes" && 'Combine2020'[Created Date]<=related('Table B:'[Published date])))

 

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Hello Amit:

If I want to get the values from [Created date] for just 3 months from [Published date], how would I change DAX?

Thanks

Thanks Amit.

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite with Arun Ulag

Featured Session: Drive Data Culture with Power BI- Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI ​

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors