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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All,
I am trying to write a Measure that converts seconds to hours and then filters by date updated in the last 30 days.
So far I am getting a syntax error on the filter and no matter what I try it just keeps failing.
Any suggestions welcomed:
Solved! Go to Solution.
Hi @Anonymous ,
Try this:
Measure 3 =
CALCULATE (
SUM ( 'CD'[Column1.fields.timeestimate] ) / 3600,
DATESINPERIOD (
CD[Column1.fields.updated.1],
LASTDATE ( CD[Column1.fields.updated.1] ),
-30,
DAY
)
)
Best Regards
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try this:
Measure 3 =
CALCULATE (
SUM ( 'CD'[Column1.fields.timeestimate] ) / 3600,
DATESINPERIOD (
CD[Column1.fields.updated.1],
LASTDATE ( CD[Column1.fields.updated.1] ),
-30,
DAY
)
)
Best Regards
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
So your brackets are not matching. You've closed the CALCULATE before the FILTER and there is an extra opening bracket on the FILTER() call that does not have a matching closing bracket.
Also you can't do a filter directly on a column you need to filter a table or a table expression, so you'd need to wrap the reference to CD[Column1.fields.updated.1] at the start of your Filter expression in something like ALL() or VALUES()
So hopefully the following should work:
Measure 3 = CALCULATE(SUM('CD'[Column1.fields.timeestimate] ) /3600,
FILTER( ALL(CD[Column1.fields.updated.1]),'CD'[Column1.fields.updated.1] >= TODAY() - 30))
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 51 | |
| 42 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 139 | |
| 116 | |
| 53 | |
| 37 | |
| 31 |