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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
itsmebvk
Continued Contributor
Continued Contributor

MTD and Previous MTD without Date table?


Hi Folks,

 

I am trying to create MTD and Previous MTD, and want to show it in Line chart. I tried many ways but couldn't get desired output. Problem here is I dont have Date table because of that many date function not working, I have one table inside that table I have total columns.

 

I want to get  MTD to LMTD for same dates. Example I want to get MTD as May 1st to 10th May and LMTD from April 1st to April 10th.

 

Any suggestions please.

 

Thanks in Advance.

2 REPLIES 2
ryan_mayu
Super User
Super User

@itsmebvk 

could you please provide the sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@itsmebvk , you can do it without date table like this one

 


MTD=
var _min = eomonth(today(),-1)+1
var _max = today()
return
CALCULATE(sum('order'[Qty]), FILTER(ALL('order'),'order'[Date] >= _min && 'order'[Date] <=_max ) )


LMTD =
var _min = eomonth(today(),-2)+1
var _max1 = today()
var _max = date(year(_max1),month(_max1)-1, day(_max1))
return
CALCULATE(sum('order'[Qty]), FILTER(ALL('order'),'order'[Date] >= _min && 'order'[Date] <=_max ) )

 

But prefer date table

refer: All About Time Intelligence around Today: https://youtu.be/gcLhhxhXKEI 

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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