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
NipawanV
Helper I
Helper I

YTD doesn't return the right value

I created YTD formula but it doesn't return the expected value YTD value. Do you have any clue?

Customer Price YTD =
CALCULATE(
    [Customer Price],
    DATESYTD(DimDate[Date])
)
 
NipawanV_0-1701326511162.png


Current Price is the mesure field: 

CustomerPrice =
VAR SalesAmount = SUM(F_PricingDashboard[Sales Amount Domestic])
VAR SalesQTY = SUM(F_PricingDashboard[Sales Quantity (Sales Time)])
RETURN
DIVIDE(SalesAmount,SalesQTY,0)
 
I have Date table well set start from 01/01/2020 etc.

I test with the other measure field that link with the other date table. Formula look ok.

NipawanV_0-1701327046044.png

 

 
2 REPLIES 2
FreemanZ
Super User
Super User

hi @NipawanV ,

 

Everything seems OK. what are you expected price YTD on different months? 

Hello, 

Thanks for the quick response. 

I just want to cross-check if the result given in the first table is correct calculation of YTD .  As to my understanding the YTD suppose to be like in this figure below and the example from previous table on my second picture that show YTD of the Est. Reveue YTD as it's suppose to be which is quite correct in my opinion. 

NipawanV_0-1701334734204.png


So if it's correct.  I want to know how does PBI calculate Customer Price YTD on the above table to get such figures. 

  

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.