Forum Discussion

NipawanV's avatar
NipawanV
Icon for Helper I rankHelper I
2 years ago

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])
)
 


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.

 

 

2 Replies

    • NipawanV's avatar
      NipawanV
      Icon for Helper I rankHelper I

      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. 


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