Forum Discussion

vally57's avatar
vally57
Icon for Helper I rankHelper I
3 years ago
Solved

Calculate YTD

Hello Experts,

I have created YTD calculation, but the result is not coming as expected. It is not showing any values.

Can anyone help me by looking from the file attached.
https://www.dropbox.com/s/dvh41vo45igf94v/F1%20-%20Test.pbix?dl=0

Thanks in Advance.


  • Hi vally57 ,

     

    Please try:

    GC YTD Current Year Actual = TOTALYTD(SUM('Fact Finance General Ledger'[GC Debit Credit Amount]),'Fiscal Period'[Calendar Date])

    Final output:

     

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Hi vally57 ,

     

    Please try:

    GC YTD Current Year Actual = TOTALYTD(SUM('Fact Finance General Ledger'[GC Debit Credit Amount]),'Fiscal Period'[Calendar Date])

    Final output:

     

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

      Thanks v-jianboli-msft . It is working now. 
      I tried to create prior year for the same 

      GC YTD Prior Year Actual = CALCULATE([GC YTD Current Year Actual], SAMEPERIODLASTYEAR('Fiscal Period'[Calendar Date].[Date]))
      But the value I'm getting is same value of YTD
  • Hi vally57 ,

     

    Please try:

    GC YTD Prior Year Actual = CALCULATE(SUM('Fact Finance General Ledger'[GC Credit Amount]),FILTER(ALL('Fiscal Period'),'Fiscal Period'[Fiscal Year]=MAX('Fiscal Period'[Fiscal Year])-1))

    Output:

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.