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! Get ahead of the game and start preparing now! Learn more
i am trying to subtract previous lines to get the number of seconds of two times. i always need the calculation for my selected filter as my data set is too large and an error message comes up. i always need the calculation of times for my selected view based on the filters not for the complete file.
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _last=
MAXX(
FILTER(ALLSELECTED('Table'),
'Table'[Date1]<MAX('Table'[Date1])),[Date1])
return
DATEDIFF(
_last,MAX('Table'[Date1]),SECOND)
2. Result:
Before filtering:
After filtering:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _last=
MAXX(
FILTER(ALLSELECTED('Table'),
'Table'[Date1]<MAX('Table'[Date1])),[Date1])
return
DATEDIFF(
_last,MAX('Table'[Date1]),SECOND)
2. Result:
Before filtering:
After filtering:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
can you tell me also how i can calculate the average time of the row?
thank you for your help
You would use the OFFSET function for that. Give it a try.
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!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 20 | |
| 13 | |
| 12 |