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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 46 | |
| 30 | |
| 24 | |
| 23 |
| User | Count |
|---|---|
| 145 | |
| 111 | |
| 64 | |
| 38 | |
| 32 |