cancel
Showing results for
Did you mean:
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

@Nita , Try like

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

Tutorial Series Dax Vs SQL Direct Query PBI Tips

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!

3 REPLIES 3
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])))

Tutorial Series Dax Vs SQL Direct Query PBI Tips

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!

Helper II

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

Helper II

Thanks Amit.

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group