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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cristianml
Post Prodigy
Post Prodigy

YTD / MTD calculation

Hi,

 

I need to calculate Year to date amounts but starting in September, not as calendar date.  Also I need to show both period in same dashboard (YTD and MTD). Any ideas/solution for this ?

 

Thanks in advance.

 

Regards.

3 ACCEPTED SOLUTIONS
LivioLanzo
Solution Sage
Solution Sage

The DATESYTD function has an optional parameter which lets you specify the year end

 

https://msdn.microsoft.com/en-us/query-bi/dax/datesytd-function-dax

 


 


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


Proud to be a Datanaut!  

View solution in original post

dobregon
Impactful Individual
Impactful Individual

you can use the function CALCULATE(SUM[AMOUNT],DATESYTD[dates]) and then when you put in the visual remember to put the dates too and filter since september.

Other function that i think... is to create a new table with dates since september (one date for each row). do a relathionship between your table of sales & dates and then is new table of dates to use in the visuals



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

Hi,

 

I created a  base table date for filter purposes. Thanks !

 

View solution in original post

4 REPLIES 4
dobregon
Impactful Individual
Impactful Individual

you can use the function CALCULATE(SUM[AMOUNT],DATESYTD[dates]) and then when you put in the visual remember to put the dates too and filter since september.

Other function that i think... is to create a new table with dates since september (one date for each row). do a relathionship between your table of sales & dates and then is new table of dates to use in the visuals



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Hi,

 

I created a  base table date for filter purposes. Thanks !

 

LivioLanzo
Solution Sage
Solution Sage

The DATESYTD function has an optional parameter which lets you specify the year end

 

https://msdn.microsoft.com/en-us/query-bi/dax/datesytd-function-dax

 


 


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


Proud to be a Datanaut!  

Hi, 

 

Thanks.!! It helped.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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