Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
aishak12
Helper IV
Helper IV

Filter date by last 30 days

All,

 

I have this date format and I would like to only see the past 30 days for Labor billed in my report.

Does anyone know how I can create a measure for past 30 days?

8 REPLIES 8
MahyarTF
Memorable Member
Memorable Member

Hi,

You could use below measure :

Last30DaysValue = CALCULATE(sum(Sheet120[Fee]), FILTER(sheet120, Sheet120[Date] > TODAY()-30))
MahyarTF_0-1676938348940.png

 

Appreciate your Kudos and please mark it as a solution if it helps you

Mahyartf

I tried this and no data is appearing in my visual. This is the Date field. I want the SUM of labor billed in the past 30 days 

aishak12_0-1676943174860.png

 

aishak12_1-1676943198636.png

 



Did you try to create the measure on Date field ?

And would you please share the result of the new measure you created ?

Mahyartf
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

aishak12_2-1676943232463.png

I would like the SUM of Labor Billed for the past 30 days 

Hi,

In the Query Editor, seperate the Time from the End Date column.  Create a Calendar Table and a relationship (Many to One and SIngle) from the End Date column to the Calendar Table.  Wrie these measure

LB = sum(Data[Labor billed])

LB in last 30 days = calculate([LB],datesbetween(calendar[Date],today()-29,today()))

Drag the LB in last 30 days measure to a card visual.

Hope this helps.

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

can you show an example of this?

Hi,

Please follow the instructions i have mentioned in my previous message.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.