Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hi,
I was wondering how to find the number of days between tables?
My calendar table is as follows:
Solved! Go to Solution.
Or try a measure like
Measure 3 = CALCULATE(sumx(SUMMARIZE(filter(crossjoin('Date',Sheet1),Sheet1[DATE_OPENED]<='Date'[Date] && Sheet1[REPAIR_DATE]>='Date'[Date]),[Date],[DATE_OPENED],Sheet1[WR_NO],"_diff",DATEDIFF([DATE_OPENED],[Date],DAY)),[_diff]),CROSSFILTER('Date'[Date],Sheet1[DATE_OPENED],None))
Attachment after signature
This can be done like this
datediff(MIN(Query1[DATE_OPENED]),MAX(Query1[DATE_OPENED]),day)
Row context is important, please check my blog for that. you might have to use summarize or values for correct grand total
Hi @amitchandak again 🙂
so I used this formula:
@amitchandak another way of asking the question is
for each date in the Calendar table, I want to subtract these dates inidividually from all the Date Opened dates in the Query table
I have been thinking about this and it seems like I would need to create a column for each date in the Calendar table?
is this even possible?
Thank you!
Sarah
@Anonymous , you can create a new table like and get from it
Table = SUMMARIZE(filter(crossjoin('Date',Sheet1),Sheet1[DATE_OPENED]<='Date'[Date] && Sheet1[REPAIR_DATE]>='Date'[Date]),[Date],[DATE_OPENED],Sheet1[WR_NO],"_diff",DATEDIFF([DATE_OPENED],[Date],DAY))
Or try a measure like
Measure 3 = CALCULATE(sumx(SUMMARIZE(filter(crossjoin('Date',Sheet1),Sheet1[DATE_OPENED]<='Date'[Date] && Sheet1[REPAIR_DATE]>='Date'[Date]),[Date],[DATE_OPENED],Sheet1[WR_NO],"_diff",DATEDIFF([DATE_OPENED],[Date],DAY)),[_diff]),CROSSFILTER('Date'[Date],Sheet1[DATE_OPENED],None))
Attachment after signature
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!