Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi,
I want to calculate conversion as following:
Table AA
Table BB
I want to count the matching records between the two tables with the condition that the latest date of table AA should be <= 15 days of the earliest date in table BB.
As per the above conditions the conversion count should be 1 as following
@Anonymous , In case you need column you add column to table 2
maxx(filter(Table1, Table1[Date] <= Table2[Date] ), Table1[Date])
Count is
Count(filter(Table1, Table1[Date] <= Table2[Date] && Table1[Contract_id] = Table2[Contract_id]), Table1[Date])
Hi,
It is not giving the required output.
Hi @Anonymous,
You can try to use the following measure formula to calculate the row count based on your condition:
formula =
VAR currID =
MAX ( TableA[ID] )
VAR _dateB =
MAXX ( FILTER ( TableB, [ID] = currID ), [Date] )
RETURN
COUNTROWS (
FILTER (
ALLSELECTED ( TableA ),
[ID] = currID
&& [Date]
<= DATE ( YEAR ( _dateB ), MONTH ( _dateB ), DAY ( _dateB ) - 15 )
)
)
Regards,
Xiaoxin Sheng
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |