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 nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello oracle.
I am VERY new to Power BI and DAX is terrifying to me, so, please be gentle 🙂
I want to work out the amount of time (in days) between two dates. I'd like to work this out for the single dates but also looks at averages across all of the dates. Is this possible?, and is it possible to do without using DAX as I'm completely clueless there?
Solved! Go to Solution.
Hi @annejeel ,
Pls test the below:(difference)
= Table.AddColumn(#"Changed Type", "Custom", each let
s = [date1],
e =[date2],
x =
List.Generate(
()=>s,
each _<=e,
each Date.AddDays(_,1)
),
l = List.Select(
x,
each Date.DayOfWeek(_,Day.Monday)<5
)
in
List.Count(l))
Average:
= Table.AddColumn(#"Changed Type1", "Custom2", each List.Average(#"Changed Type1"[datediff]))
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @annejeel ,
Pls test the below:(difference)
= Table.AddColumn(#"Changed Type", "Custom", each let
s = [date1],
e =[date2],
x =
List.Generate(
()=>s,
each _<=e,
each Date.AddDays(_,1)
),
l = List.Select(
x,
each Date.DayOfWeek(_,Day.Monday)<5
)
in
List.Count(l))
Average:
= Table.AddColumn(#"Changed Type1", "Custom2", each List.Average(#"Changed Type1"[datediff]))
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi
if you want to find the difference between two dates then you can achieve it in Power Query editor like below. Share some sample data and also show the expected result to help more.
Thanks
Hari
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 29 | |
| 27 | |
| 24 | |
| 24 | |
| 18 |
| User | Count |
|---|---|
| 54 | |
| 50 | |
| 41 | |
| 33 | |
| 29 |