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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX labour costs for the current month

Hi all,

 

i looked an 10+ threads but none seems to do the trick for me....

 

I have labour costs which are varrying every month.

So i want to build an KPI which is comparing this month and the previous month. 

 

for that I need a DAX which goes kind of like 

Temps TM = CALCULATE([40014 Costs of rented employees]; FILTER('Accounting Date'; MONTH(TODAY())))
 
but it doesnt give me the current month data but the total amount.
 
I would really appreciate it if some of you guys have some ideas and are willing to share them 🙂
 
Thanks in advance
 
BR,
Paul

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try with a date calendar

MTD Sales = CALCULATE([40014 Costs of rented employees],DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE([40014 Costs of rented employees],DATESMTD(dateadd('Date'[Date],-1,MONTH)))
training MTD Sales = CALCULATE([40014 Costs of rented employees],(dateadd('Date'[Date],-1,MONTH)))

last MTD (complete) Sales =  CALCULATE([40014 Costs of rented employees],DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD (complete) Sales =  CALCULATE([40014 Costs of rented employees],DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
last year MTD Sales =  CALCULATE([40014 Costs of rented employees],DATESMTD(dateadd('Date'[Date],-12,MONTH)))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 

 

Change a bit in the FILTER, and stick with your formula:

 

This month = CALCULATE([40014 Costs of rented employees]; FILTER('Accounting Date'; MONTH([Date])=MONTH(TODAY())))

Previous month = CALCULATE([40014 Costs of rented employees]; FILTER('Accounting Date'; MONTH([Date])=MONTH(TODAY())-1))

 

 

Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

Try with a date calendar

MTD Sales = CALCULATE([40014 Costs of rented employees],DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE([40014 Costs of rented employees],DATESMTD(dateadd('Date'[Date],-1,MONTH)))
training MTD Sales = CALCULATE([40014 Costs of rented employees],(dateadd('Date'[Date],-1,MONTH)))

last MTD (complete) Sales =  CALCULATE([40014 Costs of rented employees],DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD (complete) Sales =  CALCULATE([40014 Costs of rented employees],DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
last year MTD Sales =  CALCULATE([40014 Costs of rented employees],DATESMTD(dateadd('Date'[Date],-12,MONTH)))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.