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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Compare all values in column from one table with single value from other table

Hi, 

 

I've the next doubt: suppose that I have these tables, Dates and Projects:

 

Dates

Date

1981-01-01

1992-02-02

1993-03-03

2018-04-04

2019-04-04

 

Projects

Identifier     Name      Creation_date

ID1              Name1    1992-09-09

ID2              Name2    2018-02-02

 

What I want to get is the number of dates from Dates that are previous to Creation_date in Projects. In this example, for ID1 the value would be 2 (1981-01-01 and 1992-02-02) and for ID2 the value would be 3 (1981-01-01, 1992-02-02 and 1993-03-03). How can I achieve this?

 

Thank you for your help 🙂

 

4 REPLIES 4
PattemManohar
Community Champion
Community Champion

@Anonymous  Please add a New Column in Projects Table as below

 

Cnt = COUNTROWS(FILTER(Test305Dates,[Date]<Test305Projects[CreationDate]))

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

Hi @PattemManohar . First of all, thanks for your early response. I have a doubt related to Date field. How can I invoke it? Shoud I invoke it as Dates[Date]? In that case, PowerBI alerts me that a single value for Dates[Date] cannot  be determined. What's wrong with this?

hi, @Anonymous 

If you could just use this formula to add a new column

Result = COUNTROWS(FILTER(Dates,Dates[Date]<Projects[Creation_date]))

If not your case, please share your sample pbix file.

 

Best Regards,

Lin

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

@Anonymous  Could you please post the screenshot of the error message. Yes, it is Dates[Date]. I just referenced as [Date] as it is within the same Filter Context.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.