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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to break down by month a measure using DATESINPERIOD?

I have my measure that works fine:

 

Hours LTM:=

CALCULATE(

[Registered Hours] ,

'Billable Type'[Billable Type]="Chargeable"

,DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-12,MONTH)

)

 

 

I use it on several visuals; to show the ‘last 12 months hours’ breaking them down by different dimensions…

ovonel_0-1672874481886.png

 

It works!

 

 

 

Now I am trying to break them down by month:

ovonel_1-1672874481888.png

 

 

But the results don't make sense…

 

I just realize it is just showing the last 12 months for January, and the last 12 months for December, and so on… whereas what I want is the last 12 months per month… that is, to put the total 1390,60 in the corresponding months…

 

How can I do it?

 

(I tried using just     [Registered Hours] ,'Billable Type'[Billable Type]="Chargeable"     but I get data aaall the way back to many years ago…)

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

Hours LTM:= CALCULATE([Registered Hours],'Billable Type'[Billable Type]="Chargeable",previousyear('Date'[Date])

If not, then share the download link of the PBI file.


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

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

Hours LTM:= CALCULATE([Registered Hours],'Billable Type'[Billable Type]="Chargeable",previousyear('Date'[Date])

If not, then share the download link of the PBI file.


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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors