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
Anonymous
Not applicable

YTD value in MTD Metrix

Hi, 

I have created Montly data values in metrix tables and now I need to show YTD values for each columns for same rows so how could I do it with DAX?

5 REPLIES 5
vivran22
Community Champion
Community Champion

Hello @Anonymous ,

 

Can you share more details on the requirement? Sample data with required output will help.

 

You may also refer to the following article on YTD calculation:

https://www.vivran.in/post/dax-time-intelligence-part-2-till-date-aggregations

 

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Anonymous
Not applicable

 

 

Thanks for the reply @vivran22 if you see the value in right side, it is MTD and I want to show left side Year to Date value in Month to date metrix table. 

@Anonymous ,

 

You may use Time Intelligence DAX DATESMTD & DATESYTD (as explained in the article)

 

 Qty Sold (DatesMTD)RT = 
  CALCULATE(
  [Qty Sold],
   DATESMTD(ftCalendar[Date])
   )

 Qty Sold (DatesYTD) = 
  CALCULATE(
    [Qty Sold],
      DATESYTD(ftCalendar[Date])
  )
 

 

If you are not using a calendar table, replace the ftCalendar[Date] with your table date column.

 

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Anonymous
Not applicable

 

 

Thanks @vivran22 by selecting the slicer, I have got this result which seems incorrect. if you see previous image where MTD value under Sydney Core and Edge have different rows so I would need to replace only numbers with YTD for those MTD rows.

@Anonymous 

 

Can you share the sample data/pbiix file?

 

Cheers!
Vivek

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

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.

Top Solution Authors